Hi,
I'm working on a dual core psoc63 with different application, and i can see hex generated files but a specific region defined in scatter file is missing.
Any idea?
This region is used by CM0+ to store ble bonding list.
Thanks
Can you share the scatter file?
What I am guessing the issue is, is something like the below:
LOAD 0x0 0x10000 { EXEC1 0x0 0x4000{ * (+RO)} EXEC2 0xe000 0x1000{code_at_e000.o (+RO)} RAM 0x20000 0x10000{ * (+RW +ZI)} ARM_LIB_STACKHEAP 0x30000 EMPTY 0x10000{} }
The hex files represent the LOAD regions (outer braces), as this is what would be programmed into Flash on a real device. The EXECUTION regions (inner braces) are the run-time addresses... what the system will look like at the start of main(), and will be copied from its 'load' address to its 'execution' address by the C library init code.
In this case it would (attempt to) copy the EXEC2 code from some other address (after EXEC1's code) to 0xe000, which likely fails in the real world, as this would be an attempt to write to flash (0x0 - 0x10000(.
Perhaps use the FIXED keyword to ensure that it is located at that address in the binary?
LOAD 0x0 0x10000 { EXEC1 0x0 0x4000{ * (+RO)} EXEC2 0xe000 FIXED 0x1000{code_at_e000.o (+RO)} RAM 0x20000 0x10000{ * (+RW +ZI)} ARM_LIB_STACKHEAP 0x30000 EMPTY 0x10000{} }
I understood that the region i need was not included in scatter file that is like this:
//Defines region//
FIRMWARE_AREA FLASH_START FLASH_SIZE{ FIRMWARE_FLASH_VECTOR_TABLE +0 { * (RESET, +FIRST) } FIRMWARE_FLASH_CODE +0 FIXED { * (InRoot$$Sections) * (+RO) } RAM_COMMON_AREA RAM_COMMON_START UNINIT RAM_COMMON_SIZE { * (.cy_boot_noinit.appId) } FIRMWARE_RAM_VECTOR_TABLE RAM_VECTOR_TABLE_START UNINIT RAM_VECTOR_TABLE_SIZE { * (RESET_RAM, +FIRST) } FIRMWARE_RAM_DATA RAM_USER_START RAM_USER_SIZE { * (.cy_ramfunc) * (+RW, +ZI) } FIRMWARE_RAM_DATA_NO_INIT +0 UNINIT RAM_NO_INIT_DATA_SIZE { * (.noinit) }}; Emulated EEPROM Flash areaLR_EM_EEPROM EM_EEPROM_START EM_EEPROM_SIZE{ .cy_em_eeprom +0 { * (.cy_em_eeprom) }}
Now my question is there a way to generate multiple binary files? if yes how?
The linker will generate one ELF file.Use the fromelf tool to then generate true binary files, and it will create one per LOAD region (FLASH_AREA and LR_EM_EEPROM in your case).
so it is enouph this command -> fromelf --bin "Objects\@L.axf" --output "Objects\@L.bin" I see that a folder a folder is created with two file but are not .bin extention. It's normale?
thanks
Yes, that is correct
many thanks