golioth / mtb-example-golioth

ModusToolbox Example Golioth App
Other
0 stars 1 forks source link

Build fails on certain BSPs #4

Closed ddka22 closed 1 year ago

ddka22 commented 1 year ago

CE (repo) name: https://github.com/golioth/mtb-example-golioth

Description: Failed to build mtb-example-golioth due to multiple errors (see in log.txt)

Steps to Reproduce:

  1. Open Project Creator
  2. Select CY8CPROTO-062S3-4343W and click on the 'Next' button
  3. Select mtb-example-golioth and click on the 'Create' button
  4. Open CLI terminal (modus-shell on Windows)
  5. Navigate in
  6. Execute
    >> make build-j8

Expected Result:

  1. Project is built successfully

Actual Result:

  1. Project is failed to build. See full log in the attachments.

BSP/Target:

CY8CKIT-062-WIFI-BT CY8CPROTO-062S3-4343W

Frequency (1/1, 1/50, 1/100): 1/1

OS Version: All

Build/Commit: ModusToolbox 3.0.0.9369

Name Version

abstraction-rtos    1.6.0.29736
cJSON   v1.7.15
cat1cm0p    1.0.0.148
clib-support    1.3.0.29736
cmsis   5.8.0.50
connectivity-utilities  3.2.1.1325
core-lib    1.3.1.29660
core-make   3.0.0.4056
cy-mbedtls-acceleration 1.4.1.930
freertos    10.4.304.461
golioth-firmware-sdk    v0.3.0
libcoap v4.3.1-rc2
lwip    STABLE-2_1_2_RELEASE
mbedtls v2.25.0
mcuboot v1.8.1-cypress
mtb-hal-cat1    2.2.0.29808
mtb-pdl-cat1    3.0.0.19024
recipe-make-cat1a   2.0.0.4056
retarget-io 1.3.0.25183
secure-sockets  2.5.0.1967
serial-flash    1.3.0.27308
udb-sdio-whd    1.2.0.29660
whd-bsp-integration 2.1.0.29660
wifi-connection-manager 2.3.0.1494
wifi-host-driver    2.5.0.15307
wifi-mw-core    3.4.0.905
wpa3-external-supplicant    1.1.0.98

Compiler: (example: GCC_ARM, IAR, ARM) GCC_ARM

ncmiller commented 1 year ago

Thanks for flagging @ddka22 .

Seems to be some kind of issue related to generating required mcuboot defines. I will look into it.

If I can't fix the issue quickly, I will remove the unsupported boards from the CE manifest: https://github.com/golioth/mtb-golioth-ce-manifest/blob/main/mtb-golioth-ce-manifest-fv2.xml#L2

ncmiller commented 1 year ago

The main issue was that there was not enough internal flash on that board to store the primary image (only has 512K, but needs 1.3M). So the flash map python script failed with an error, which led to compilation errors later.

I attempted to resolve by changing the flash map to move the primary application to external flash, but then I got a linker error:

arm-none-eabi/bin/ld: section .text LMA [0000000018000400,00000000180962c7] overlaps section .cy_xip LMA [0000000018000000,0000000018068a64]

For now, I simply removed support for this board in the CE manifest:

https://github.com/golioth/mtb-golioth-ce-manifest/commit/3bc72b2ee4d6bab2595ee2ef7f5cc091dbc99d7f

I also removed support for the cy8ckit_062_wifi_bt board for the same reason, since it only has 1M of internal flash:

https://github.com/golioth/mtb-golioth-ce-manifest/commit/f379428d967628fd509a5ac8e1c8f7f9c286faf1

ddka22 commented 1 year ago

Thanks for looking into this!