I'm trying to add freeRTOS to cm0p for the project "Dual-CPU_Empty_PSoC6_App" but I keep getting this error:
../bsps/TARGET_APP_CY8CPROTO-062-4343W/COMPONENT_CM0P/TOOLCHAIN_GCC_ARM/linker.ld:312 cannot move location counter backwards (from 08001670 to 08001000)
I'm pretty new using both PSoC62 and freeRTOS. I'm able to add freeRTOS to cm4 but I need freeRTOS in each core. The error seems related to RAM but I can't figure what's wrong. Below are pictures showing the linker files settings for the RAM for both cores:
Is this a setting I need to change in FreeRTOSConfig.h or something else?
The error message you show above is referencing line 312 in the linker.ld file. It would be hard to debug this without seeing the ld file. But taking a guess it looks like something in the ld file (or somewhere else) is hardcoded to 0x08001000 but at the point of the error you have already used 0x1670 bytes of RAM. I wouldn't suspect any addresses are hardcoded in the FreeRTOSConfig.h file...
This is the section of line 312 (highlighted):
The RAM length was 0x2000 and the STACK_SIZE is 0x1000 so that's the 0x08001000 value. I changed the RAM size to 0x8000 and that gave me a "cannot fit in flash" error but I know how to fix that so I changed the flash size (for cm0p) from 0x6000 to 0x8000 and now I get no errors or warnings. Thanks.