Skip to content

Commit 00ec495

Browse files
authored
Merge pull request #17 from facchinm/network_4.0.99
MISC: update to zephyr master and add initial wifi support
2 parents 8514e6e + ed11937 commit 00ec495

File tree

8,330 files changed

+3472654
-187044
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

8,330 files changed

+3472654
-187044
lines changed

boards.txt

+135-1
Original file line numberDiff line numberDiff line change
@@ -337,4 +337,138 @@ portentah7.debug.server.openocd.scripts.0=interface/{programmer.protocol}.cfg
337337
portentah7.debug.server.openocd.scripts.1={programmer.transport_script}
338338
portentah7.debug.server.openocd.scripts.2=target/stm32h7x_dual_bank.cfg
339339
portentah7.debug.cortex-debug.custom.request=attach
340-
portentah7.debug.svd_file={runtime.platform.path}/svd/STM32H747_CM7.svd
340+
portentah7.debug.svd_file={runtime.platform.path}/svd/STM32H747_CM7.svd
341+
342+
##############################################################################################################
343+
344+
frdm_rw612.name=RW612
345+
frdm_rw612.build.core=arduino
346+
frdm_rw612.build.crossprefix=arm-zephyr-eabi-
347+
frdm_rw612.build.compiler_path={runtime.tools.arm-zephyr-eabi-0.16.8.path}/bin/
348+
349+
frdm_rw612.menu.debug.false=Standard
350+
frdm_rw612.menu.debug.true=Debug
351+
352+
frdm_rw612.menu.debug.false.post_build_arg=
353+
frdm_rw612.menu.debug.true.post_build_arg=debug
354+
355+
frdm_rw612.build.variant=frdm_rw612
356+
frdm_rw612.build.mcu=cortex-m33+nodsp
357+
frdm_rw612.build.fpu=-mfpu=fpv5-sp-d16
358+
frdm_rw612.build.architecture=cortex-m33+nodsp
359+
frdm_rw612.compiler.zephyr.arch.define=
360+
361+
frdm_rw612.build.board={build.variant}
362+
363+
frdm_rw612.build.float-abi=-mfloat-abi=hard
364+
frdm_rw612.build.extra_flags=
365+
frdm_rw612.build.postbuild.cmd="{tools.imgtool.path}/{tools.imgtool.cmd}" exit
366+
frdm_rw612.build.board=frdm_rw612
367+
frdm_rw612.build.extra_ldflags=
368+
frdm_rw612.compiler.zephyr.arch.define=
369+
frdm_rw612.compiler.zephyr.defines=-DLL_EXTENSION_BUILD -DCONFIG_ARDUINO_API_SERIAL_BUFFER_SIZE=256 -DCPU_RW612ETA2I -DRW610 -DKERNEL -DK_HEAP_MEM_POOL_SIZE=122880 -DLPFLEXCOMM_INIT_NOT_USED_IN_DRIVER=1 -DNDEBUG -DPICOLIBC_DOUBLE_PRINTF_SCANF -D__LINUX_ERRNO_EXTENSIONS__ -D__PROGRAM_START -D__ZEPHYR__=1 -imacros{build.variant.path}/llext-edk/include/zephyr/include/generated/zephyr/autoconf.h -imacros{build.variant.path}/llext-edk/include/zephyr/include/zephyr/toolchain/zephyr_stdint.h
370+
frdm_rw612.compiler.zephyr.ldflags=-fno-exceptions -fno-rtti -fno-threadsafe-statics -fno-unwind-tables -fno-use-cxa-atexit
371+
frdm_rw612.compiler.zephyr.cflags=-fno-strict-aliasing -fno-printf-return-value -fno-common -mthumb -mabi=aapcs -mfp16-format=ieee -mtp=soft -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wdouble-promotion -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-asynchronous-unwind-tables -ftls-model=local-exec -fno-reorder-functions --param=min-pagesize=0 -fno-defer-pop --specs=picolibc.specs -D_POSIX_THREADS -mlong-calls -nodefaultlibs
372+
frdm_rw612.compiler.zephyr.cxxflags={compiler.zephyr.ldflags} -fdata-sections -ffunction-sections -fno-unwind-tables -fno-strict-aliasing -fno-printf-return-value -fno-common -mthumb -mabi=aapcs -mfp16-format=ieee -mtp=soft -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wdouble-promotion -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -fno-asynchronous-unwind-tables -ftls-model=local-exec -fno-reorder-functions --param=min-pagesize=0 -fno-defer-pop --specs=picolibc.specs -D_POSIX_THREADS -mlong-calls -nodefaultlibs
373+
frdm_rw612.compiler.zephyr.includes={build.variant.path}/includes.txt
374+
frdm_rw612.compiler.zephyr.extra_ldflags=-lstdc++ -lsupc++ -lnosys -nostdlib
375+
frdm_rw612.compiler.zephyr=
376+
frdm_rw612.vid.0=0x1fc9
377+
frdm_rw612.pid.0=0x0143
378+
frdm_rw612.upload_port.0.vid=0x1fc9
379+
frdm_rw612.upload_port.0.pid=0x0143
380+
frdm_rw612.upload.address=0x18323000
381+
frdm_rw612.upload.target=rw612
382+
383+
frdm_rw612.upload.tool=pyocd
384+
frdm_rw612.upload.tool.default=pyocd
385+
frdm_rw612.upload.protocol=
386+
frdm_rw612.upload.transport=
387+
frdm_rw612.upload.vid=0x1fc9
388+
frdm_rw612.upload.pid=0x0143
389+
frdm_rw612.upload.interface=0
390+
frdm_rw612.upload.use_1200bps_touch=false
391+
frdm_rw612.upload.wait_for_upload_port=false
392+
frdm_rw612.upload.native_usb=true
393+
frdm_rw612.upload.maximum_size=1966080
394+
frdm_rw612.upload.maximum_data_size=523624
395+
396+
frdm_rw612.bootloader.tool=pyocd
397+
frdm_rw612.bootloader.tool.default=pyocd
398+
frdm_rw612.bootloader.file=zephyr-frdm_rw612.elf
399+
frdm_rw612.bootloader.target=rw612
400+
401+
##########################################################################################
402+
403+
niclasense.name=Arduino Nicla Sense ME
404+
niclasense.build.core=arduino
405+
niclasense.build.crossprefix=arm-zephyr-eabi-
406+
niclasense.build.compiler_path={runtime.tools.arm-zephyr-eabi-0.16.8.path}/bin/
407+
408+
niclasense.menu.debug.false=Standard
409+
niclasense.menu.debug.true=Debug
410+
411+
niclasense.menu.debug.false.post_build_arg=
412+
niclasense.menu.debug.true.post_build_arg=debug
413+
414+
niclasense.build.variant=arduino_nicla_sense_me
415+
niclasense.build.mcu=cortex-m4
416+
niclasense.build.fpu=-mfpu=fpv4-sp-d16
417+
niclasense.build.architecture=cortex-m4
418+
niclasense.compiler.zephyr.arch.define=
419+
420+
niclasense.build.board={build.variant}
421+
422+
niclasense.build.float-abi=-mfloat-abi=hard
423+
niclasense.build.extra_flags=
424+
niclasense.build.postbuild.cmd="{tools.imgtool.path}/{tools.imgtool.cmd}" exit
425+
niclasense.build.architecture=cortex-m4
426+
niclasense.build.board=ARDUINO_NICLA_SENSE_ME
427+
niclasense.build.extra_ldflags=
428+
niclasense.compiler.zephyr.defines=-DLL_EXTENSION_BUILD -DCONFIG_ARDUINO_API_SERIAL_BUFFER_SIZE=256 -DNRF52832_XXAA -DK_HEAP_MEM_POOL_SIZE=1024 -DKERNEL -DPICOLIBC_LONG_LONG_PRINTF_SCANF -D__LINUX_ERRNO_EXTENSIONS__ -D__PROGRAM_START -D__ZEPHYR__=1 -imacros{build.variant.path}/llext-edk/include/zephyr/include/generated/zephyr/autoconf.h -imacros{build.variant.path}/llext-edk/include/zephyr/include/zephyr/toolchain/zephyr_stdint.h
429+
niclasense.compiler.zephyr.ldflags=-fno-exceptions -fno-rtti -fno-threadsafe-statics -fno-unwind-tables -fno-use-cxa-atexit
430+
niclasense.compiler.zephyr.cflags=-fno-strict-aliasing -fno-printf-return-value -fno-common -mcpu=cortex-m4 -mthumb -mabi=aapcs -mfp16-format=ieee -mtp=soft -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wdouble-promotion -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-asynchronous-unwind-tables -ftls-model=local-exec -fno-reorder-functions --param=min-pagesize=0 -fno-defer-pop --specs=picolibc.specs -D_POSIX_THREADS -mlong-calls -nodefaultlibs
431+
niclasense.compiler.zephyr.cxxflags={compiler.zephyr.ldflags} -fdata-sections -ffunction-sections -fno-unwind-tables -fno-strict-aliasing -fno-printf-return-value -fno-common -mcpu=cortex-m4 -mthumb -mabi=aapcs -mfp16-format=ieee -mtp=soft -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wdouble-promotion -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -fno-asynchronous-unwind-tables -ftls-model=local-exec -fno-reorder-functions --param=min-pagesize=0 -fno-defer-pop --specs=picolibc.specs -D_POSIX_THREADS -mlong-calls -nodefaultlibs
432+
niclasense.compiler.zephyr.includes={build.variant.path}/includes.txt
433+
niclasense.compiler.zephyr.extra_ldflags=-lstdc++ -lsupc++ -lnosys -nostdlib
434+
niclasense.compiler.zephyr=
435+
niclasense.vid.0=0x2341
436+
niclasense.pid.0=0x0360
437+
niclasense.upload_port.0.vid=0x2341
438+
niclasense.upload_port.0.pid=0x0060
439+
440+
#niclasense.upload.tool=openocd
441+
#niclasense.upload.tool.default=openocd
442+
niclasense.upload.tool=pyocd
443+
niclasense.upload.tool.default=pyocd
444+
niclasense.upload.protocol=
445+
niclasense.upload.transport=
446+
niclasense.upload.vid=0x2341
447+
niclasense.upload.pid=0x0060
448+
niclasense.upload.interface=0
449+
niclasense.upload.use_1200bps_touch=false
450+
niclasense.upload.wait_for_upload_port=false
451+
niclasense.upload.native_usb=false
452+
niclasense.upload.maximum_size=1966080
453+
niclasense.upload.maximum_data_size=523624
454+
niclasense.upload.address=0x70000
455+
niclasense.upload.target=nrf52
456+
457+
niclasense.upload.maximum_size=786432
458+
niclasense.upload.maximum_data_size=523624
459+
460+
#niclasense.bootloader.tool=openocd
461+
#niclasense.bootloader.tool.default=openocd
462+
niclasense.bootloader.tool=pyocd
463+
niclasense.bootloader.tool.default=pyocd
464+
niclasense.bootloader.vid=0x2341
465+
niclasense.bootloader.pid=0x0360
466+
niclasense.bootloader.interface=0
467+
niclasense.bootloader.file=zephyr-arduino_nicla_sense_me.hex
468+
niclasense.bootloader.target=nrf52
469+
470+
niclasense.debug.tool=gdb
471+
niclasense.debug.server.openocd.scripts.0=interface/{programmer.protocol}.cfg
472+
niclasense.debug.server.openocd.scripts.1={programmer.transport_script}
473+
niclasense.debug.server.openocd.scripts.2=target/nrf52.cfg
474+
niclasense.debug.cortex-debug.custom.request=attach

cores/arduino/abi.cpp

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/*
2+
* Copyright (c) 2024 Arduino SA
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#include <stdlib.h>
8+
9+
extern "C" void __cxa_pure_virtual(void) {}
10+
extern "C" void __cxa_deleted_virtual(void) {}
11+
extern "C" int __cxa_atexit(void (*func) (void *), void * arg, void * dso_handle) {
12+
return 0;
13+
}
14+
15+
namespace std {
16+
void __throw_length_error(const char* __s __attribute__((unused))) {}
17+
};
18+
19+
extern "C" int strcmp(const char* s1, const char* s2) {
20+
while(*s1 && (*s1 == *s2))
21+
{
22+
s1++;
23+
s2++;
24+
}
25+
return *(const unsigned char*)s1 - *(const unsigned char*)s2;
26+
}

cores/arduino/new

+22-10
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#define NEW_H
99

1010
#include <stdlib.h>
11+
//#pragma long_calls
1112

1213
namespace std {
1314
struct nothrow_t {};
@@ -27,25 +28,36 @@ namespace std {
2728
using size_t = ::size_t;
2829
} // namespace std
2930

30-
[[gnu::weak]] void * operator new(std::size_t size);
31-
[[gnu::weak]] void * operator new[](std::size_t size);
31+
void * operator new(std::size_t size);
32+
void * operator new[](std::size_t size);
3233

33-
[[gnu::weak]] void * operator new(std::size_t size, const std::nothrow_t tag) noexcept;
34-
[[gnu::weak]] void * operator new[](std::size_t size, const std::nothrow_t& tag) noexcept;
34+
#if __cplusplus >= 201703L
35+
void * operator new(std::size_t count, std::align_val_t al);
36+
void * operator new[](std::size_t count, std::align_val_t al);
37+
38+
void* operator new(std::size_t count, std::align_val_t al,
39+
const std::nothrow_t& tag) noexcept;
40+
void* operator new[](std::size_t count, std::align_val_t al,
41+
const std::nothrow_t& tag) noexcept;
42+
#endif
43+
44+
void * operator new(std::size_t size, const std::nothrow_t tag) noexcept;
45+
void * operator new[](std::size_t size, const std::nothrow_t& tag) noexcept;
3546

3647
void * operator new(std::size_t size, void *place) noexcept;
3748
void * operator new[](std::size_t size, void *place) noexcept;
3849

39-
[[gnu::weak]] void operator delete(void * ptr) noexcept;
40-
[[gnu::weak]] void operator delete[](void * ptr) noexcept;
50+
51+
void operator delete(void * ptr) noexcept;
52+
void operator delete[](void * ptr) noexcept;
4153

4254
#if __cplusplus >= 201402L
43-
[[gnu::weak]] void operator delete(void* ptr, std::size_t size) noexcept;
44-
[[gnu::weak]] void operator delete[](void * ptr, std::size_t size) noexcept;
55+
void operator delete(void* ptr, std::size_t size) noexcept;
56+
void operator delete[](void * ptr, std::size_t size) noexcept;
4557
#endif // __cplusplus >= 201402L
4658

47-
[[gnu::weak]] void operator delete(void* ptr, const std::nothrow_t& tag) noexcept;
48-
[[gnu::weak]] void operator delete[](void* ptr, const std::nothrow_t& tag) noexcept;
59+
void operator delete(void* ptr, const std::nothrow_t& tag) noexcept;
60+
void operator delete[](void* ptr, const std::nothrow_t& tag) noexcept;
4961

5062
void operator delete(void* ptr, void* place) noexcept;
5163
void operator delete[](void* ptr, void* place) noexcept;

cores/arduino/new.cpp

+31-3
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66

77
#include "new.h"
88

9-
extern "C" void __cxa_pure_virtual() {}
10-
119
// The C++ spec dictates that allocation failure should cause the
1210
// (non-nothrow version of the) operator new to throw an exception.
1311
// Since we expect to have exceptions disabled, it would be more
@@ -46,6 +44,36 @@ void * operator new[](std::size_t size) {
4644
return operator new(size);
4745
}
4846

47+
#if __cplusplus >= 201703L
48+
void* operator new(std::size_t count, std::align_val_t al) {
49+
return operator new(count);
50+
}
51+
52+
void* operator new[](std::size_t count, std::align_val_t al) {
53+
return operator new(count);
54+
}
55+
56+
void * operator new(std::size_t size, std::align_val_t al, const std::nothrow_t tag) noexcept {
57+
#if defined(NEW_TERMINATES_ON_FAILURE)
58+
// Cannot call throwing operator new as standard suggests, so call
59+
// new_helper directly then
60+
return new_helper(size);
61+
#else
62+
return operator new(size);
63+
#endif
64+
}
65+
66+
void * operator new[](std::size_t size, std::align_val_t al, const std::nothrow_t& tag) noexcept {
67+
#if defined(NEW_TERMINATES_ON_FAILURE)
68+
// Cannot call throwing operator new[] as standard suggests, so call
69+
// malloc directly then
70+
return new_helper(size);
71+
#else
72+
return operator new[](size);
73+
#endif
74+
}
75+
#endif
76+
4977
void * operator new(std::size_t size, const std::nothrow_t tag) noexcept {
5078
#if defined(NEW_TERMINATES_ON_FAILURE)
5179
// Cannot call throwing operator new as standard suggests, so call
@@ -104,4 +132,4 @@ void operator delete(void* ptr, void* place) noexcept {
104132
void operator delete[](void* ptr, void* place) noexcept {
105133
(void)ptr; (void)place; // unused
106134
// Nothing to do
107-
}
135+
}

extra/build_all.sh

+3-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
set -e
44

55
./extra/build.sh arduino_giga_r1//m7 arduino_giga_r1_m7
6-
./extra/build.sh arduino_nano_33_ble_sense arduino_nano_33_ble_sense
6+
./extra/build.sh arduino_nano_33_ble//sense arduino_nano_33_ble_sense
77
./extra/build.sh arduino_portenta_h7//m7 arduino_portenta_h7
88
./extra/build.sh ek_ra8d1 ek_ra8d1
9-
./extra/build.sh frdm_mcxn947/mcxn947/cpu0 frdm_mcxn947_mcxn947_cpu0
9+
./extra/build.sh frdm_mcxn947/mcxn947/cpu0 frdm_mcxn947_mcxn947_cpu0
10+
./extra/build.sh frdm_rw612 frdm_rw612
3.14 KB
Binary file not shown.
107 KB
Binary file not shown.
18.6 KB
Binary file not shown.
337 KB
Binary file not shown.
230 KB
Binary file not shown.
3.76 MB
Binary file not shown.
70.7 KB
Binary file not shown.
978 KB
Binary file not shown.

firmwares/zephyr-ek_ra8d1.elf

144 KB
Binary file not shown.

0 commit comments

Comments
 (0)