Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/cleanup #11

Merged
merged 12 commits into from
Feb 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .github/workflows/zig-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: recursive
lfs: true

- name: Setup Python
uses: actions/setup-python@v4
Expand Down
20 changes: 7 additions & 13 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -28,24 +28,18 @@
[submodule "csrc/connectivity/wakaama"]
path = csrc/connectivity/wakaama
url = [email protected]:FranciscoLlobet/wakaama.git
[submodule "csrc/connectivity/MQTT-C"]
path = csrc/connectivity/MQTT-C
url = [email protected]:FranciscoLlobet/MQTT-C.git
[submodule "csrc/connectivity/paho.mqtt.embedded-c"]
path = csrc/connectivity/paho.mqtt.embedded-c
url = [email protected]:FranciscoLlobet/paho.mqtt.embedded-c.git
[submodule "csrc/connectivity/picohttpparser"]
path = csrc/connectivity/picohttpparser
url = https://github.com/FranciscoLlobet/picohttpparser.git
[submodule "csrc/mcuboot/--force"]
path = csrc/mcuboot/--force
url = https://github.com/FranciscoLlobet/mcuboot.git
[submodule "csrc/mcuboot/mcuboot"]
path = csrc/mcuboot/mcuboot
url = https://github.com/FranciscoLlobet/mcuboot.git
[submodule "csrc/picolibc"]
path = csrc/picolibc
url = [email protected]:FranciscoLlobet/picolibc.git
[submodule "toolchain/picolibc"]
path = toolchain/picolibc
url = https://github.com/FranciscoLlobet/picolibc.git
url = [email protected]:FranciscoLlobet/picolibc.git
[submodule "csrc/system/gecko_sdk"]
path = csrc/system/gecko_sdk
url = [email protected]:FranciscoLlobet/gecko_sdk.git
[submodule "csrc/mcuboot"]
path = csrc/mcuboot
url = [email protected]:FranciscoLlobet/mcuboot.git
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -380,3 +380,9 @@ Verify Configuration
```console
openssl dgst -sha256 -verify config.pub -signature config.sig config.txt
```

# Build picolibc

```console
meson setup --cross-file scripts/cross-clang-thumbv7m-none-eabi-miso.txt --optimization 2 ./build --wipe
```
6 changes: 3 additions & 3 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ pub fn build(b: *std.Build) !void {
const bootloader = microzig.addFirmware(b, bootloader_target);
bootloader.addSystemIncludePath(.{ .path = "toolchain/clang-compiled/picolibc/include" });
bootloader.addObjectFile(.{ .path = "toolchain/clang-compiled/picolibc/libc.a" });
bootloader.addObjectFile(.{ .path = "csrc/system/gecko_sdk/emdrv/nvm3/lib/libnvm3_CM3_gcc.a" });
bootloader.addObjectFile(.{ .path = "csrc/system/gecko_sdk/platform/emdrv/nvm3/lib/libnvm3_CM3_gcc.a" });

for (include_path_array) |path| {
bootloader.addIncludePath(.{ .path = path });
Expand All @@ -125,7 +125,7 @@ pub fn build(b: *std.Build) !void {

application.addSystemIncludePath(.{ .path = "toolchain/clang-compiled/picolibc/include" });
application.addObjectFile(.{ .path = "toolchain/clang-compiled/picolibc/libc.a" });
application.addObjectFile(.{ .path = "csrc/system/gecko_sdk/emdrv/nvm3/lib/libnvm3_CM3_gcc.a" });
application.addObjectFile(.{ .path = "csrc/system/gecko_sdk/platform/emdrv/nvm3/lib/libnvm3_CM3_gcc.a" });

for (include_path_array) |path| {
application.addIncludePath(.{ .path = path });
Expand All @@ -150,7 +150,7 @@ pub fn build(b: *std.Build) !void {

mqtt_app.addSystemIncludePath(.{ .path = "toolchain/clang-compiled/picolibc/include" });
mqtt_app.addObjectFile(.{ .path = "toolchain/clang-compiled/picolibc/libc.a" });
mqtt_app.addObjectFile(.{ .path = "csrc/system/gecko_sdk/emdrv/nvm3/lib/libnvm3_CM3_gcc.a" });
mqtt_app.addObjectFile(.{ .path = "csrc/system/gecko_sdk/platform/emdrv/nvm3/lib/libnvm3_CM3_gcc.a" });

for (include_path_array) |path| {
mqtt_app.addIncludePath(.{ .path = path });
Expand Down
234 changes: 118 additions & 116 deletions build_gecko_sdk.zig
Original file line number Diff line number Diff line change
Expand Up @@ -3,141 +3,143 @@ const microzig = @import("microzig");

const c_flags = [_][]const u8{ "-DEFM32GG390F1024", "-O2", "-DSL_CATALOG_POWER_MANAGER_PRESENT=1", "-DEFM_DEBUG", "-DSL_RAMFUNC_DISABLE", "-DEM_MSC_RUN_FROM_FLASH", "-fdata-sections", "-ffunction-sections" };

const gecko_sdk_base_dir = "csrc/system/gecko_sdk/platform";

const include_path = [_][]const u8{
// Gecko-SDK Defines
"csrc/system/EFM32GG390F1024",
"csrc/system/gecko_sdk/common/inc/",
"csrc/system/gecko_sdk/common/errno/inc/",
"csrc/system/gecko_sdk/emlib/inc/",
"csrc/system/gecko_sdk/emlib/host/inc",
"csrc/system/gecko_sdk/emdrv/common/inc",
"csrc/system/gecko_sdk/emdrv/dmadrv/inc",
"csrc/system/gecko_sdk/emdrv/emcode/inc",
"csrc/system/gecko_sdk/emdrv/gpiointerrupt/inc",
"csrc/system/gecko_sdk/emdrv/spidrv/inc",
"csrc/system/gecko_sdk/emdrv/uartdrv/inc",
"csrc/system/gecko_sdk/emdrv/nvm3/inc",
"csrc/system/gecko_sdk/driver/button/inc",
"csrc/system/gecko_sdk/driver/debug/inc",
"csrc/system/gecko_sdk/driver/i2cspm/inc",
"csrc/system/gecko_sdk/driver/leddrv/inc",
"csrc/system/gecko_sdk/service/device_init/inc",
"csrc/system/gecko_sdk/service/udelay/inc",
"csrc/system/gecko_sdk/service/sleeptimer/inc",
"csrc/system/gecko_sdk/service/iostream/inc",
"csrc/system/gecko_sdk/service/power_manager/inc",
"csrc/system/gecko_sdk/middleware/usb_gecko/inc",
"csrc/system/gecko_sdk/middleware/usbxpress/inc/",
gecko_sdk_base_dir ++ "/Device/SiliconLabs/EFM32GG/Include",
gecko_sdk_base_dir ++ "/common/inc/",
gecko_sdk_base_dir ++ "/common/errno/inc/",
gecko_sdk_base_dir ++ "/emlib/inc/",
gecko_sdk_base_dir ++ "/emlib/host/inc",
gecko_sdk_base_dir ++ "/emdrv/common/inc",
gecko_sdk_base_dir ++ "/emdrv/dmadrv/inc",
gecko_sdk_base_dir ++ "/emdrv/emcode/inc",
gecko_sdk_base_dir ++ "/emdrv/gpiointerrupt/inc",
gecko_sdk_base_dir ++ "/emdrv/spidrv/inc",
gecko_sdk_base_dir ++ "/emdrv/uartdrv/inc",
gecko_sdk_base_dir ++ "/emdrv/nvm3/inc",
gecko_sdk_base_dir ++ "/driver/button/inc",
gecko_sdk_base_dir ++ "/driver/debug/inc",
gecko_sdk_base_dir ++ "/driver/i2cspm/inc",
gecko_sdk_base_dir ++ "/driver/leddrv/inc",
gecko_sdk_base_dir ++ "/service/device_init/inc",
gecko_sdk_base_dir ++ "/service/udelay/inc",
gecko_sdk_base_dir ++ "/service/sleeptimer/inc",
gecko_sdk_base_dir ++ "/service/iostream/inc",
gecko_sdk_base_dir ++ "/service/power_manager/inc",
gecko_sdk_base_dir ++ "/middleware/usb_gecko/inc",
gecko_sdk_base_dir ++ "/middleware/usbxpress/inc/",
};

const source_paths = [_][]const u8{
// Adding EMLIB essentials
"csrc/system/gecko_sdk/common/src/sl_assert.c",
"csrc/system/gecko_sdk/common/src/sl_slist.c",
//"csrc/system/gecko_sdk/common/errno/src/sl_errno.c",
"csrc/system/gecko_sdk/emlib/src/em_acmp.c",
"csrc/system/gecko_sdk/emlib/src/em_adc.c",
"csrc/system/gecko_sdk/emlib/src/em_aes.c",
"csrc/system/gecko_sdk/emlib/src/em_burtc.c",
"csrc/system/gecko_sdk/emlib/src/em_can.c",
"csrc/system/gecko_sdk/emlib/src/em_cmu_fpga.c",
"csrc/system/gecko_sdk/emlib/src/em_cmu.c",
"csrc/system/gecko_sdk/emlib/src/em_core.c",
"csrc/system/gecko_sdk/emlib/src/em_cryotimer.c",
"csrc/system/gecko_sdk/emlib/src/em_crypto.c",
"csrc/system/gecko_sdk/emlib/src/em_csen.c",
"csrc/system/gecko_sdk/emlib/src/em_dac.c",
"csrc/system/gecko_sdk/emlib/src/em_dbg.c",
"csrc/system/gecko_sdk/emlib/src/em_dma.c",
"csrc/system/gecko_sdk/emlib/src/em_ebi.c",
"csrc/system/gecko_sdk/emlib/src/em_emu.c",
"csrc/system/gecko_sdk/emlib/src/em_eusart.c",
"csrc/system/gecko_sdk/emlib/src/em_gpcrc.c",
"csrc/system/gecko_sdk/emlib/src/em_gpio.c",
"csrc/system/gecko_sdk/emlib/src/em_i2c.c",
"csrc/system/gecko_sdk/emlib/src/em_iadc.c",
"csrc/system/gecko_sdk/emlib/src/em_idac.c",
"csrc/system/gecko_sdk/emlib/src/em_lcd.c",
"csrc/system/gecko_sdk/emlib/src/em_ldma.c",
"csrc/system/gecko_sdk/emlib/src/em_lesense.c",
"csrc/system/gecko_sdk/emlib/src/em_letimer.c",
"csrc/system/gecko_sdk/emlib/src/em_leuart.c",
"csrc/system/gecko_sdk/emlib/src/em_msc.c",
"csrc/system/gecko_sdk/emlib/src/em_opamp.c",
"csrc/system/gecko_sdk/emlib/src/em_pcnt.c",
"csrc/system/gecko_sdk/emlib/src/em_pdm.c",
"csrc/system/gecko_sdk/emlib/src/em_prs.c",
"csrc/system/gecko_sdk/emlib/src/em_qspi.c",
"csrc/system/gecko_sdk/emlib/src/em_rmu.c",
"csrc/system/gecko_sdk/emlib/src/em_rtc.c",
"csrc/system/gecko_sdk/emlib/src/em_rtcc.c",
"csrc/system/gecko_sdk/emlib/src/em_se.c",
"csrc/system/gecko_sdk/emlib/src/em_system.c",
"csrc/system/gecko_sdk/emlib/src/em_timer.c",
"csrc/system/gecko_sdk/emlib/src/em_usart.c",
"csrc/system/gecko_sdk/emlib/src/em_vcmp.c",
"csrc/system/gecko_sdk/emlib/src/em_vdac.c",
"csrc/system/gecko_sdk/emlib/src/em_wdog.c",
gecko_sdk_base_dir ++ "/common/src/sl_assert.c",
gecko_sdk_base_dir ++ "/common/src/sl_slist.c",
//gecko_sdk_base_dir ++ "/common/errno/src/sl_errno.c",
gecko_sdk_base_dir ++ "/emlib/src/em_acmp.c",
gecko_sdk_base_dir ++ "/emlib/src/em_adc.c",
gecko_sdk_base_dir ++ "/emlib/src/em_aes.c",
gecko_sdk_base_dir ++ "/emlib/src/em_burtc.c",
gecko_sdk_base_dir ++ "/emlib/src/em_can.c",
gecko_sdk_base_dir ++ "/emlib/src/em_cmu_fpga.c",
gecko_sdk_base_dir ++ "/emlib/src/em_cmu.c",
gecko_sdk_base_dir ++ "/emlib/src/em_core.c",
gecko_sdk_base_dir ++ "/emlib/src/em_cryotimer.c",
gecko_sdk_base_dir ++ "/emlib/src/em_crypto.c",
gecko_sdk_base_dir ++ "/emlib/src/em_csen.c",
gecko_sdk_base_dir ++ "/emlib/src/em_dac.c",
gecko_sdk_base_dir ++ "/emlib/src/em_dbg.c",
gecko_sdk_base_dir ++ "/emlib/src/em_dma.c",
gecko_sdk_base_dir ++ "/emlib/src/em_ebi.c",
gecko_sdk_base_dir ++ "/emlib/src/em_emu.c",
gecko_sdk_base_dir ++ "/emlib/src/em_eusart.c",
gecko_sdk_base_dir ++ "/emlib/src/em_gpcrc.c",
gecko_sdk_base_dir ++ "/emlib/src/em_gpio.c",
gecko_sdk_base_dir ++ "/emlib/src/em_i2c.c",
gecko_sdk_base_dir ++ "/emlib/src/em_iadc.c",
gecko_sdk_base_dir ++ "/emlib/src/em_idac.c",
gecko_sdk_base_dir ++ "/emlib/src/em_lcd.c",
gecko_sdk_base_dir ++ "/emlib/src/em_ldma.c",
gecko_sdk_base_dir ++ "/emlib/src/em_lesense.c",
gecko_sdk_base_dir ++ "/emlib/src/em_letimer.c",
gecko_sdk_base_dir ++ "/emlib/src/em_leuart.c",
gecko_sdk_base_dir ++ "/emlib/src/em_msc.c",
gecko_sdk_base_dir ++ "/emlib/src/em_opamp.c",
gecko_sdk_base_dir ++ "/emlib/src/em_pcnt.c",
gecko_sdk_base_dir ++ "/emlib/src/em_pdm.c",
gecko_sdk_base_dir ++ "/emlib/src/em_prs.c",
gecko_sdk_base_dir ++ "/emlib/src/em_qspi.c",
gecko_sdk_base_dir ++ "/emlib/src/em_rmu.c",
gecko_sdk_base_dir ++ "/emlib/src/em_rtc.c",
gecko_sdk_base_dir ++ "/emlib/src/em_rtcc.c",
gecko_sdk_base_dir ++ "/emlib/src/em_se.c",
gecko_sdk_base_dir ++ "/emlib/src/em_system.c",
gecko_sdk_base_dir ++ "/emlib/src/em_timer.c",
gecko_sdk_base_dir ++ "/emlib/src/em_usart.c",
gecko_sdk_base_dir ++ "/emlib/src/em_vcmp.c",
gecko_sdk_base_dir ++ "/emlib/src/em_vdac.c",
gecko_sdk_base_dir ++ "/emlib/src/em_wdog.c",

"csrc/system/gecko_sdk/emdrv/dmadrv/src/dmactrl.c",
"csrc/system/gecko_sdk/emdrv/dmadrv/src/dmadrv.c",
"csrc/system/gecko_sdk/emdrv/gpiointerrupt/src/gpiointerrupt.c",
"csrc/system/gecko_sdk/emdrv/spidrv/src/spidrv.c",
"csrc/system/gecko_sdk/emdrv/uartdrv/src/uartdrv.c",
gecko_sdk_base_dir ++ "/emdrv/dmadrv/src/dmactrl.c",
gecko_sdk_base_dir ++ "/emdrv/dmadrv/src/dmadrv.c",
gecko_sdk_base_dir ++ "/emdrv/gpiointerrupt/src/gpiointerrupt.c",
gecko_sdk_base_dir ++ "/emdrv/spidrv/src/spidrv.c",
gecko_sdk_base_dir ++ "/emdrv/uartdrv/src/uartdrv.c",

//"csrc/system/gecko_sdk/emdrv/nvm3/src/nvm3_default.c",
//"csrc/system/gecko_sdk/emdrv/nvm3/src/nvm3_default_common_linker.c",
"csrc/system/gecko_sdk/emdrv/nvm3/src/nvm3_hal_flash.c",
"csrc/system/gecko_sdk/emdrv/nvm3/src/nvm3_lock.c",
//gecko_sdk_base_dir ++ "/emdrv/nvm3/src/nvm3_default.c",
//gecko_sdk_base_dir ++ "/emdrv/nvm3/src/nvm3_default_common_linker.c",
gecko_sdk_base_dir ++ "/emdrv/nvm3/src/nvm3_hal_flash.c",
gecko_sdk_base_dir ++ "/emdrv/nvm3/src/nvm3_lock.c",

"csrc/system/gecko_sdk/driver/button/src/sl_button.c",
"csrc/system/gecko_sdk/driver/button/src/sl_simple_button.c",
"csrc/system/gecko_sdk/driver/debug/src/sl_debug_swo.c",
"csrc/system/gecko_sdk/driver/i2cspm/src/sl_i2cspm.c",
"csrc/system/gecko_sdk/driver/leddrv/src/sl_led.c",
"csrc/system/gecko_sdk/driver/leddrv/src/sl_simple_led.c",
gecko_sdk_base_dir ++ "/driver/button/src/sl_button.c",
gecko_sdk_base_dir ++ "/driver/button/src/sl_simple_button.c",
gecko_sdk_base_dir ++ "/driver/debug/src/sl_debug_swo.c",
gecko_sdk_base_dir ++ "/driver/i2cspm/src/sl_i2cspm.c",
gecko_sdk_base_dir ++ "/driver/leddrv/src/sl_led.c",
gecko_sdk_base_dir ++ "/driver/leddrv/src/sl_simple_led.c",
// Adding udelay Helper
"csrc/system/gecko_sdk/service/udelay/src/sl_udelay.c",
"csrc/system/gecko_sdk/service/udelay/src/sl_udelay_armv6m_gcc.S",
gecko_sdk_base_dir ++ "/service/udelay/src/sl_udelay.c",
gecko_sdk_base_dir ++ "/service/udelay/src/sl_udelay_armv6m_gcc.S",
// Adding Device-Init Helpers
"csrc/system/gecko_sdk/service/device_init/src/sl_device_init_emu_s0.c",
"csrc/system/gecko_sdk/service/device_init/src/sl_device_init_hfrco.c",
"csrc/system/gecko_sdk/service/device_init/src/sl_device_init_hfxo_s0.c",
"csrc/system/gecko_sdk/service/device_init/src/sl_device_init_lfrco.c",
"csrc/system/gecko_sdk/service/device_init/src/sl_device_init_lfxo_s0.c",
"csrc/system/gecko_sdk/service/device_init/src/sl_device_init_nvic.c",
"csrc/system/gecko_sdk/service/power_manager/src/sl_power_manager_debug.c",
"csrc/system/gecko_sdk/service/power_manager/src/sl_power_manager_hal_s0_s1.c",
"csrc/system/gecko_sdk/service/power_manager/src/sl_power_manager.c",
gecko_sdk_base_dir ++ "/service/device_init/src/sl_device_init_emu_s0.c",
gecko_sdk_base_dir ++ "/service/device_init/src/sl_device_init_hfrco.c",
gecko_sdk_base_dir ++ "/service/device_init/src/sl_device_init_hfxo_s0.c",
gecko_sdk_base_dir ++ "/service/device_init/src/sl_device_init_lfrco.c",
gecko_sdk_base_dir ++ "/service/device_init/src/sl_device_init_lfxo_s0.c",
gecko_sdk_base_dir ++ "/service/device_init/src/sl_device_init_nvic.c",
gecko_sdk_base_dir ++ "/service/power_manager/src/sl_power_manager_debug.c",
gecko_sdk_base_dir ++ "/service/power_manager/src/sl_power_manager_hal_s0_s1.c",
gecko_sdk_base_dir ++ "/service/power_manager/src/sl_power_manager.c",

// Adding the sleeptimer service
"csrc/system/gecko_sdk/service/sleeptimer/src/sl_sleeptimer_hal_burtc.c",
"csrc/system/gecko_sdk/service/sleeptimer/src/sl_sleeptimer_hal_rtc.c",
"csrc/system/gecko_sdk/service/sleeptimer/src/sl_sleeptimer.c",
gecko_sdk_base_dir ++ "/service/sleeptimer/src/sl_sleeptimer_hal_burtc.c",
gecko_sdk_base_dir ++ "/service/sleeptimer/src/sl_sleeptimer_hal_rtc.c",
gecko_sdk_base_dir ++ "/service/sleeptimer/src/sl_sleeptimer.c",

// Adding the iostream
"csrc/system/gecko_sdk/service/iostream/src/sl_iostream_debug.c",
"csrc/system/gecko_sdk/service/iostream/src/sl_iostream_retarget_stdio.c",
"csrc/system/gecko_sdk/service/iostream/src/sl_iostream_stdio.c",
"csrc/system/gecko_sdk/service/iostream/src/sl_iostream_swo_itm_8.c",
"csrc/system/gecko_sdk/service/iostream/src/sl_iostream_swo.c",
"csrc/system/gecko_sdk/service/iostream/src/sl_iostream.c",
gecko_sdk_base_dir ++ "/service/iostream/src/sl_iostream_debug.c",
gecko_sdk_base_dir ++ "/service/iostream/src/sl_iostream_retarget_stdio.c",
gecko_sdk_base_dir ++ "/service/iostream/src/sl_iostream_stdio.c",
gecko_sdk_base_dir ++ "/service/iostream/src/sl_iostream_swo_itm_8.c",
gecko_sdk_base_dir ++ "/service/iostream/src/sl_iostream_swo.c",
gecko_sdk_base_dir ++ "/service/iostream/src/sl_iostream.c",

// Adding USB device
"csrc/system/gecko_sdk/middleware/usb_gecko/src/em_usbhint.c",
"csrc/system/gecko_sdk/middleware/usb_gecko/src/em_usbtimer.c",
"csrc/system/gecko_sdk/middleware/usb_gecko/src/em_usbd.c",
"csrc/system/gecko_sdk/middleware/usb_gecko/src/em_usbdch9.c",
"csrc/system/gecko_sdk/middleware/usb_gecko/src/em_usbdep.c",
"csrc/system/gecko_sdk/middleware/usb_gecko/src/em_usbdint.c",
"csrc/system/gecko_sdk/middleware/usb_gecko/src/em_usbh.c",
"csrc/system/gecko_sdk/middleware/usb_gecko/src/em_usbhal.c",
"csrc/system/gecko_sdk/middleware/usb_gecko/src/em_usbhep.c",
gecko_sdk_base_dir ++ "/middleware/usb_gecko/src/em_usbhint.c",
gecko_sdk_base_dir ++ "/middleware/usb_gecko/src/em_usbtimer.c",
gecko_sdk_base_dir ++ "/middleware/usb_gecko/src/em_usbd.c",
gecko_sdk_base_dir ++ "/middleware/usb_gecko/src/em_usbdch9.c",
gecko_sdk_base_dir ++ "/middleware/usb_gecko/src/em_usbdep.c",
gecko_sdk_base_dir ++ "/middleware/usb_gecko/src/em_usbdint.c",
gecko_sdk_base_dir ++ "/middleware/usb_gecko/src/em_usbh.c",
gecko_sdk_base_dir ++ "/middleware/usb_gecko/src/em_usbhal.c",
gecko_sdk_base_dir ++ "/middleware/usb_gecko/src/em_usbhep.c",

// Adding USB express
"csrc/system/gecko_sdk/middleware/usbxpress/src/em_usbxpress_descriptors.c",
"csrc/system/gecko_sdk/middleware/usbxpress/src/em_usbxpress.c",
"csrc/system/gecko_sdk/middleware/usbxpress/src/em_usbxpress_callback.c",
gecko_sdk_base_dir ++ "/middleware/usbxpress/src/em_usbxpress_descriptors.c",
gecko_sdk_base_dir ++ "/middleware/usbxpress/src/em_usbxpress.c",
gecko_sdk_base_dir ++ "/middleware/usbxpress/src/em_usbxpress_callback.c",
};

pub fn aggregate(exe: *microzig.Firmware) void {
Expand Down
34 changes: 16 additions & 18 deletions build_mcuboot.zig
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,25 @@ const std = @import("std");
const microzig = @import("microzig");

const include_path = [_][]const u8{
"csrc/mcuboot/mcuboot/boot/bootutil/include",
"csrc/mcuboot/mcuboot/boot/zig-freertos",
"csrc/mcuboot/boot/bootutil/include",
"csrc/mcuboot/boot/zig-freertos",
};

const source_path = [_][]const u8{
"csrc/mcuboot/mcuboot/boot/bootutil/src/boot_record.c",
"csrc/mcuboot/mcuboot/boot/bootutil/src/bootutil_misc.c",
"csrc/mcuboot/mcuboot/boot/bootutil/src/bootutil_public.c",
"csrc/mcuboot/mcuboot/boot/bootutil/src/caps.c",
"csrc/mcuboot/mcuboot/boot/bootutil/src/encrypted.c",
"csrc/mcuboot/mcuboot/boot/bootutil/src/fault_injection_hardening.c",
"csrc/mcuboot/mcuboot/boot/bootutil/src/fault_injection_hardening_delay_rng_mbedtls.c",
"csrc/mcuboot/mcuboot/boot/bootutil/src/image_ecdsa.c",
// "csrc/mcuboot/mcuboot/boot/bootutil/src/image_ed25519.c",
// "csrc/mcuboot/mcuboot/boot/bootutil/src/image_rsa.c",
"csrc/mcuboot/mcuboot/boot/bootutil/src/image_validate.c",
"csrc/mcuboot/mcuboot/boot/bootutil/src/loader.c",
"csrc/mcuboot/mcuboot/boot/bootutil/src/swap_misc.c",
"csrc/mcuboot/mcuboot/boot/bootutil/src/swap_move.c",
"csrc/mcuboot/mcuboot/boot/bootutil/src/swap_scratch.c",
"csrc/mcuboot/mcuboot/boot/bootutil/src/tlv.c",
"csrc/mcuboot/boot/bootutil/src/boot_record.c",
"csrc/mcuboot/boot/bootutil/src/bootutil_misc.c",
"csrc/mcuboot/boot/bootutil/src/bootutil_public.c",
"csrc/mcuboot/boot/bootutil/src/caps.c",
"csrc/mcuboot/boot/bootutil/src/encrypted.c",
"csrc/mcuboot/boot/bootutil/src/fault_injection_hardening.c",
"csrc/mcuboot/boot/bootutil/src/fault_injection_hardening_delay_rng_mbedtls.c",
"csrc/mcuboot/boot/bootutil/src/image_ecdsa.c",
"csrc/mcuboot/boot/bootutil/src/image_validate.c",
"csrc/mcuboot/boot/bootutil/src/loader.c",
"csrc/mcuboot/boot/bootutil/src/swap_misc.c",
"csrc/mcuboot/boot/bootutil/src/swap_move.c",
"csrc/mcuboot/boot/bootutil/src/swap_scratch.c",
"csrc/mcuboot/boot/bootutil/src/tlv.c",
};

const c_flags = [_][]const u8{ "-DEFM32GG390F1024", "-O2", "-fdata-sections", "-ffunction-sections" };
Expand Down
4 changes: 4 additions & 0 deletions csrc/config/sl_device_init_hfxo_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@
// <i> Default: 48000000
#define SL_DEVICE_INIT_HFXO_FREQ 48000000

// <o SL_DEVICE_INIT_HFXO_PRECISION> HFXO precision in PPM <0-65535>
// <i> Default: 50
#define SL_DEVICE_INIT_HFXO_PRECISION 50

// <o SL_DEVICE_INIT_HFXO_BOOST> Boost
// <0=> 50% boost
// <1=> 70% boost
Expand Down
1 change: 1 addition & 0 deletions csrc/mcuboot
Submodule mcuboot added at 873192
Loading
Loading