- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi ,
I have been spending the last few days trying to figure out how to increase the flash size according to the linkers scripts for GCC -Arm compiler.
According to the documentation and a few of the posts this should not be that difficult but it is proving to be an big challenge .
According to the documentation in the dual system design guide,in the CMOP linker script the following should be the correct changes , with 512 byte blocks for the flash
ram (rwx) : ORIGIN = 0x08000000, LENGTH = 0x8000
flash (rx) : ORIGIN = 0x10000000, LENGTH = 0x40000
According to the documentation in the dual system design guide I only need to change the following for the CM4 linker script
/* The size of the Cortex-M0+ application image at the start of FLASH */
FLASH_CM0P_SIZE =0x40000;
However if I change to anything above 0x2000 for the flash on the CM0 both cores stop working .
Compiling does not complain about the changes which seem to indicate its correct but when programming a hard fault gets generated . I am unable to pin point the hard fault and this only happens when the flash is changed in the linker scripts .
[100%] [################################] [ Programming ]
Info : SWD DPIDR 0x6ba02477
Info : kitprog3: acquiring the device (mode: reset)...
psoc6.cpu.cm0 halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x00001f34 msp: 0x080477a8
** Device acquired successfully
** psoc6.cpu.cm4: Ran after reset and before halt...
psoc6.cpu.cm4 halted due to debug-request, current mode: Thread
xPSR: 0x61000000 pc: 0x1600400c msp: 00000000
Info : SWD DPIDR 0x6ba02477
Error: [psoc6.cpu.cm4] clearing lockup after double fault
psoc6.cpu.cm4 halted due to debug-request, current mode: Handler HardFault
xPSR: 0x41000003 pc: 0x8008f3ee msp: 0x080457e0
psoc6.cpu.cm0 halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x080002ba msp: 0x08001fb8
Info : dropped 'gdb' connection
Any assistance is welcome
C
Solved! Go to Solution.
- Labels:
-
PSoC 6 MCU
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @conradc2380 ,
Did you define the M4 Core flash address start point?
Please implement the step 5 and let us know if it hits the hard fault again. I tried to allocate same space on an empty dual core application, I was able to build and program correctly.
Warm regards
Sobhit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @conradc2380 ,
Did you define the M4 Core flash address start point?
Please implement the step 5 and let us know if it hits the hard fault again. I tried to allocate same space on an empty dual core application, I was able to build and program correctly.
Warm regards
Sobhit