CE220960 App2 does not build: non constant or forward reference address expression for section .cy_boot_ble_bss

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Panometric
Level 5
Level 5
100 sign-ins 100 replies posted 10 solutions authored

Seeing the same problem as: https://community.infineon.com/t5/PSoC-6/PSoC-6-BLE-Upgradable-Stack-Bootloader-compilation-build-er...

But the proposed solution is not a solution, because that setting is already OK: 

Panometric_0-1640813721822.png

I am seeing 2 issues:

1. Building app1 post step fails: 

post_build_core0.bat creator .\CortexM0p\ARM_GCC_541\Debug Bootloader_BLE_Upgradable_Stack_App1 GCC
------------------------------------------
Post-build commands for Cortex-M0p core
------------------------------------------
C:\tmp\Bootloader_BLE_Upgradable_Stack_App1\Bootloader_BLE_Upgradable_Stack_App1.cydsn>"C:\Program Files (x86)\Cypress\PDL\3.0.1""\tools\win\elf\cymcuelftool.exe" --codeshare .\CortexM0p\ARM_GCC_541\Debug\Bootloader_BLE_Upgradable_Stack_App1.elf BLE_Symbols.txt GCC --output ..\Bootloader_BLE_Upgradable_Stack_App2.cydsn\BLE_core0_shared.s
Error opening file: ..\Bootloader_BLE_Upgradable_Stack_App2.cydsn\BLE_core0_shared.s
The command 'post_build_core0.bat' failed with exit code '1'.

However, this seems like an error that can ignored, since this output file should not exist yet.  The instructions are quite clear: on P2:  2. Build the projects in the following order: App0, App1, and App2.

2. Building app 2 fails: 

arm-none-eabi-gcc.exe -Wl,--start-group -o C:\tmp\Bootloader_BLE_Upgradable_Stack_App2\Bootloader_BLE_Upgradable_Stack_App2.cydsn\CortexM4\ARM_GCC_541\Debug\Bootloader_BLE_Upgradable_Stack_App2_link.elf .\CortexM4\ARM_GCC_541\Debug\startup_psoc63_cm4.o .\CortexM4\ARM_GCC_541\Debug\main_cm4.o .\CortexM4\ARM_GCC_541\Debug\system_psoc63_cm4.o .\CortexM4\ARM_GCC_541\Debug\bas.o .\CortexM4\ARM_GCC_541\Debug\debug.o .\CortexM4\ARM_GCC_541\Debug\hids.o .\CortexM4\ARM_GCC_541\Debug\scps.o .\CortexM4\ARM_GCC_541\Debug\host_main.o .\CortexM4\ARM_GCC_541\Debug\bond.o .\CortexM4\ARM_GCC_541\Debug\ias.o .\CortexM4\ARM_GCC_541\Debug\user_interface.o .\CortexM4\ARM_GCC_541\Debug\cy_ipc_config.o .\CortexM4\ARM_GCC_541\Debug\cyfitter_sysint_cfg.o .\CortexM4\ARM_GCC_541\Debug\cymetadata.o .\CortexM4\ARM_GCC_541\Debug\UART_DEB.o .\CortexM4\ARM_GCC_541\Debug\BLE.o .\CortexM4\ARM_GCC_541\Debug\BLE_config.o .\CortexM4\ARM_GCC_541\Debug\BLE_bas_config.o .\CortexM4\ARM_GCC_541\Debug\BLE_hids_config.o .\CortexM4\ARM_GCC_541\Debug\BLE_dis_config.o .\CortexM4\ARM_GCC_541\Debug\BLE_scps_config.o .\CortexM4\ARM_GCC_541\Debug\BLE_ias_config.o .\CortexM4\ARM_GCC_541\Debug\cy_sysint.o .\CortexM4\ARM_GCC_541\Debug\cy_ipc_drv.o .\CortexM4\ARM_GCC_541\Debug\cy_ipc_sema.o .\CortexM4\ARM_GCC_541\Debug\cy_ipc_pipe.o .\CortexM4\ARM_GCC_541\Debug\cy_sysclk.o .\CortexM4\ARM_GCC_541\Debug\cy_wdt.o .\CortexM4\ARM_GCC_541\Debug\cy_scb_common.o .\CortexM4\ARM_GCC_541\Debug\cy_scb_i2c.o .\CortexM4\ARM_GCC_541\Debug\cy_scb_ezi2c.o .\CortexM4\ARM_GCC_541\Debug\cy_scb_spi.o .\CortexM4\ARM_GCC_541\Debug\cy_scb_uart.o .\CortexM4\ARM_GCC_541\Debug\cy_efuse.o .\CortexM4\ARM_GCC_541\Debug\cy_flash.o .\CortexM4\ARM_GCC_541\Debug\cy_gpio.o .\CortexM4\ARM_GCC_541\Debug\cy_sysanalog.o .\CortexM4\ARM_GCC_541\Debug\cy_syspm.o .\CortexM4\ARM_GCC_541\Debug\cy_syslib.o .\CortexM4\ARM_GCC_541\Debug\cy_syslib_gcc.o .\CortexM4\ARM_GCC_541\Debug\cy_trigmux.o .\CortexM4\ARM_GCC_541\Debug\cy_systick.o .\CortexM4\ARM_GCC_541\Debug\cy_profile.o .\CortexM4\ARM_GCC_541\Debug\cy_prot.o .\CortexM4\ARM_GCC_541\Debug\cy_lvd.o .\CortexM4\ARM_GCC_541\Debug\cy_ble.o .\CortexM4\ARM_GCC_541\Debug\cy_ble_hal_int.o .\CortexM4\ARM_GCC_541\Debug\cy_ble_hal_pvt.o .\CortexM4\ARM_GCC_541\Debug\cy_ble_gap.o .\CortexM4\ARM_GCC_541\Debug\cy_ble_gatt.o .\CortexM4\ARM_GCC_541\Debug\cy_ble_event_handler.o .\CortexM4\ARM_GCC_541\Debug\cy_ble_ancs.o .\CortexM4\ARM_GCC_541\Debug\cy_ble_ans.o .\CortexM4\ARM_GCC_541\Debug\cy_ble_aios.o .\CortexM4\ARM_GCC_541\Debug\cy_ble_bas.o .\CortexM4\ARM_GCC_541\Debug\cy_ble_bcs.o .\CortexM4\ARM_GCC_541\Debug\cy_ble_bls.o .\CortexM4\ARM_GCC_541\Debug\cy_ble_bms.o .\CortexM4\ARM_GCC_541\Debug\cy_ble_bts.o .\CortexM4\ARM_GCC_541\Debug\cy_ble_cgms.o .\CortexM4\ARM_GCC_541\Debug\cy_ble_cps.o .\CortexM4\ARM_GCC_541\Debug\cy_ble_cscs.o .\CortexM4\ARM_GCC_541\Debug\cy_ble_cts.o .\CortexM4\ARM_GCC_541\Debug\cy_ble_custom.o .\CortexM4\ARM_GCC_541\Debug\cy_ble_dis.o .\CortexM4\ARM_GCC_541\Debug\cy_ble_ess.o .\CortexM4\ARM_GCC_541\Debug\cy_ble_gls.o .\CortexM4\ARM_GCC_541\Debug\cy_ble_hids.o .\CortexM4\ARM_GCC_541\Debug\cy_ble_hps.o .\CortexM4\ARM_GCC_541\Debug\cy_ble_hrs.o .\CortexM4\ARM_GCC_541\Debug\cy_ble_hts.o .\CortexM4\ARM_GCC_541\Debug\cy_ble_ias.o .\CortexM4\ARM_GCC_541\Debug\cy_ble_ips.o .\CortexM4\ARM_GCC_541\Debug\cy_ble_lls.o .\CortexM4\ARM_GCC_541\Debug\cy_ble_lns.o .\CortexM4\ARM_GCC_541\Debug\cy_ble_ndcs.o .\CortexM4\ARM_GCC_541\Debug\cy_ble_plxs.o .\CortexM4\ARM_GCC_541\Debug\cy_ble_pass.o .\CortexM4\ARM_GCC_541\Debug\cy_ble_rscs.o .\CortexM4\ARM_GCC_541\Debug\cy_ble_rtus.o .\CortexM4\ARM_GCC_541\Debug\cy_ble_scps.o .\CortexM4\ARM_GCC_541\Debug\cy_ble_tps.o .\CortexM4\ARM_GCC_541\Debug\cy_ble_uds.o .\CortexM4\ARM_GCC_541\Debug\cy_ble_wpts.o .\CortexM4\ARM_GCC_541\Debug\cy_ble_wss.o .\CortexM4\ARM_GCC_541\Debug\cy_ble_clk.o .\CortexM4\ARM_GCC_541\Debug\cy_bootload.o .\CortexM4\ARM_GCC_541\Debug\BLE_core1_shared.o -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 -mthumb -L Generated_Source\PSoC6 -Wl,-Map,.\CortexM4\ARM_GCC_541\Debug/Bootloader_BLE_Upgradable_Stack_App2.map -T ./bootload_cm4.ld -specs=nano.specs -Wl,--gc-sections -g -ffunction-sections -Og -ffat-lto-objects -Wl,--end-group
./bootload_cm4.ld:243: non constant or forward reference address expression for section .cy_boot_ble_bss

The offending section is:

.cy_boot_ble_bss ABSOLUTE(__ble_core1_bss_start__) (NOLOAD):
{
*system_psoc63_cm4.o(.bss*)
*cy_ipc_sema.o(.bss*)
*cy_ipc_config.o(.bss*)
*cy_ipc_pipe.o(.bss*)
} > ram_ble_core1

@ShipingW_81  Can you look at this again?

 

 

0 Likes
1 Solution
JohnDavid
Level 2
Level 2
First like received 10 sign-ins 5 sign-ins

I had this trouble at the same time. I solved it modifying the PATH of PDL version installed. I am using PSoC Creator v4.4 and PDL v3.1.5. The example code is the CE220960 ("DFU_BLE_Upgradable_Stack_App" project). You must edit the file post_build_core1.bat (in App0 and App2) and the file post_build_core0.bat (in App1).

Verifiying: Project>Build settings>


When Build App0 (Launcher)
CM4>Linker>Custom Linker Script>.\dfuCM4.ld
CM4>User commands>post_build_core1.bat


When Build App1 (Stack BLE and DFU boot)
CM4>Linker>Custom Linker Script>.\dfuCM0p.ld
CM4>User commands>post_build_core0.bat
CM4>Linker>Custom Linker Script>.\dfuCM4.ld
CM4>User commands>post_build_core1.bat
Note: Build App0 modify the BLE_core1_shared.s file to the Ap2 project. Click OK.


When Build Ap2 (User code)
CM4>Linker>Custom Linker Script>.\dfuCM4.ld
CM4>User commands>post_build_core1.bat
Note: The BLE_core1_shared.s is located in the Source files dir

JohnDavid_0-1641254348165.png

 

 I can solve it just today.

View solution in original post

3 Replies
Panometric
Level 5
Level 5
100 sign-ins 100 replies posted 10 solutions authored

Attempting to archive the whole workspace produced no output. But here are the files for each app. 

 

Environment:
PSoC Creator 4.2 (4.2.0.641)
PDL: 3.0.1

 

0 Likes
Panometric
Level 5
Level 5
100 sign-ins 100 replies posted 10 solutions authored

The problem seems to be the way the directories are structured when the Code Example wizard does it. There are several ways to do it, as a workspace or as independent projects. But none of them work without intervention. If you follow the default suggestions, it is always wrong. 

The easiest way to create the whole workspace. 

Panometric_1-1640909977261.png

The rename the three apps it creates, removing the 01 suffixes. 

When asked about renaming say Cancel. 

Build the projects manually in this order: App0, App1, App2

Each will ask to upgrade the PDL, you also must press cancel. 

 

 

Panometric_0-1640909872612.png

 

 


0 Likes
JohnDavid
Level 2
Level 2
First like received 10 sign-ins 5 sign-ins

I had this trouble at the same time. I solved it modifying the PATH of PDL version installed. I am using PSoC Creator v4.4 and PDL v3.1.5. The example code is the CE220960 ("DFU_BLE_Upgradable_Stack_App" project). You must edit the file post_build_core1.bat (in App0 and App2) and the file post_build_core0.bat (in App1).

Verifiying: Project>Build settings>


When Build App0 (Launcher)
CM4>Linker>Custom Linker Script>.\dfuCM4.ld
CM4>User commands>post_build_core1.bat


When Build App1 (Stack BLE and DFU boot)
CM4>Linker>Custom Linker Script>.\dfuCM0p.ld
CM4>User commands>post_build_core0.bat
CM4>Linker>Custom Linker Script>.\dfuCM4.ld
CM4>User commands>post_build_core1.bat
Note: Build App0 modify the BLE_core1_shared.s file to the Ap2 project. Click OK.


When Build Ap2 (User code)
CM4>Linker>Custom Linker Script>.\dfuCM4.ld
CM4>User commands>post_build_core1.bat
Note: The BLE_core1_shared.s is located in the Source files dir

JohnDavid_0-1641254348165.png

 

 I can solve it just today.