File tree 6 files changed +71
-9
lines changed
6 files changed +71
-9
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,22 @@ permissions:
11
11
jobs :
12
12
13
13
# Examples are built in parallel to avoid CI total job time limitation
14
+ sanity-check :
15
+ runs-on : ubuntu-latest
16
+ defaults :
17
+ run :
18
+ shell : bash
19
+ steps :
20
+ - uses : actions/checkout@v3
21
+ with :
22
+ submodules : false
23
+ - uses : actions/cache@v3
24
+ with :
25
+ path : ./tools/dist
26
+ key : ${{ runner.os }}-${{ hashFiles('package/package_esp8266com_index.template.json', 'tests/common.sh', 'tests/build.sh') }}
27
+ - name : Toolchain sanity checks
28
+ run : |
29
+ bash ./tests/sanity_check.sh
14
30
15
31
build-linux :
16
32
name : Linux - LwIP ${{ matrix.lwip }} (${{ matrix.chunk }})
Original file line number Diff line number Diff line change @@ -471,7 +471,7 @@ bool EspClass::checkFlashCRC() {
471
471
uint32_t firstPart = (uintptr_t )&__crc_len - 0x40200000 ; // How many bytes to check before the 1st CRC val
472
472
473
473
// Start the checksum
474
- uint32_t crc = crc32 ((const void *)0x40200000 , firstPart, 0xffffffff );
474
+ uint32_t crc = crc32 ((const void *)0x40200000 , firstPart);
475
475
// Pretend the 2 words of crc/len are zero to be idempotent
476
476
crc = crc32 (z, 8 , crc);
477
477
// Finish the CRC calculation over the rest of flash
Original file line number Diff line number Diff line change 20
20
21
21
*/
22
22
23
-
24
23
#ifndef CORE_ESP8266_FEATURES_H
25
24
#define CORE_ESP8266_FEATURES_H
26
25
27
-
28
26
#define CORE_HAS_LIBB64
29
27
#define CORE_HAS_BASE64_CLASS
30
28
#define CORE_HAS_CXA_GUARD
33
31
#define WIFI_HAS_EVENT_CALLBACK
34
32
#define WIFI_IS_OFF_AT_BOOT
35
33
36
- #include < stdlib .h> // malloc()
34
+ #include < stdbool .h> // bool
37
35
#include < stddef.h> // size_t
38
36
#include < stdint.h>
37
+ #include < stdlib.h> // malloc()
39
38
40
39
#ifndef __STRINGIFY
41
40
#define __STRINGIFY (a ) #a
@@ -118,6 +117,7 @@ int esp_get_cpu_freq_mhz()
118
117
#else
119
118
inline int esp_get_cpu_freq_mhz ()
120
119
{
120
+ uint8_t system_get_cpu_freq (void );
121
121
return system_get_cpu_freq ();
122
122
}
123
123
#endif
@@ -129,7 +129,7 @@ void enablePhaseLockedWaveform(void);
129
129
130
130
// Determine when the sketch runs on ESP8285
131
131
#if !defined(CORE_MOCK)
132
- bool __attribute__ ((const , nothrow)) esp_is_8285( );
132
+ bool esp_is_8285 () __attribute__((const , nothrow));
133
133
#else
134
134
inline bool esp_is_8285 ()
135
135
{
Original file line number Diff line number Diff line change @@ -20,18 +20,20 @@ void esp_delay(unsigned long ms);
20
20
void esp_schedule ();
21
21
void esp_yield ();
22
22
void tune_timeshift64 (uint64_t now_us);
23
+ bool sntp_set_timezone_in_seconds (int32_t timezone );
24
+
23
25
void disable_extra4k_at_link_time (void ) __attribute__((noinline));
24
26
void enable_wifi_enterprise_patch (void ) __attribute__((noinline));
25
- bool sntp_set_timezone_in_seconds (int32_t timezone );
26
27
void __disableWiFiAtBootTime (void ) __attribute__((noinline));
27
28
void __real_system_restart_local () __attribute__((noreturn));
28
29
29
- uint32_t sqrt32 (uint32_t n);
30
- uint32_t crc32 (const void * data, size_t length, uint32_t crc = 0xffffffff );
30
+ uint32_t sqrt32 (uint32_t n);
31
31
32
32
#ifdef __cplusplus
33
33
}
34
34
35
+ uint32_t crc32 (const void * data, size_t length, uint32_t crc = 0xffffffff );
36
+
35
37
#include < functional>
36
38
37
39
using BoolCB = std::function<void (bool )>;
Original file line number Diff line number Diff line change 23
23
#include " pgmspace.h"
24
24
25
25
// moved from core_esp8266_eboot_command.cpp
26
- uint32_t crc32 (const void * data, size_t length, uint32_t crc /* = 0xffffffff */ )
26
+ uint32_t crc32 (const void * data, size_t length, uint32_t crc)
27
27
{
28
28
const uint8_t * ldata = (const uint8_t *)data;
29
29
while (length--)
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ root=$( git rev-parse --show-toplevel)
4
+ source " $root /tests/common.sh"
5
+
6
+ pushd " $root " /tools
7
+ python3 get.py -q
8
+
9
+ popd
10
+ pushd " $cache_dir "
11
+
12
+ gcc=" $root /tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-gcc" \
13
+ " -I$root /cores/esp8266" \
14
+ " -I$root /tools/sdk/include" \
15
+ " -I$root /variants/generic" \
16
+ " -I$root /tools/sdk/libc/xtensa-lx106-elf"
17
+
18
+ $gcc --verbose
19
+
20
+ set -v -x
21
+
22
+ cat << EOF > arduino.c
23
+ #include <Arduino.h>
24
+ EOF
25
+
26
+ $gcc -c arduino.c
27
+
28
+ cat << EOF > coredecls.c
29
+ #include <coredecls.h>
30
+ EOF
31
+
32
+ $gcc -c coredecls.c
33
+
34
+ cat << EOF > features.c
35
+ #include <core_esp8266_features.h>
36
+ EOF
37
+
38
+ $gcc -c features.c
39
+
40
+ cat << EOF > sdk.c
41
+ #include <version.h>
42
+ EOF
43
+
44
+ $gcc -c sdk.c
You can’t perform that action at this time.
0 commit comments