Dear all,
I have tried to follow instruction in this post but have not reached good results:
procedure A
1) to open "sys_core.asm" and to change "00800 0000" to "0x0000 0000 + sizeof(.text)" in
stackpointer definition
in my case sizeof(.text) from MAP file = 0x3408
userSp: .word 0x00004000+0x00000200
svcSp: .word 0x00004000+0x00000200+0x00002000
fiqSp: .word 0x00004000+0x00000200+0x00002000+0x00000200
irqSp: .word 0x00004000+0x00000200+0x00002000+0x00000200+0x00000200
abortSp: .word 0x00004000+0x00000200+0x00002000+0x00000200+0x00000200+0x00000100
undefSp: .word 0x00004000+0x00000200+0x00002000+0x00000200+0x00000200+0x00000100+0x00000100
2) to build the project
3) to establish a debug connection - click on "Debug" button (or press F11 key)
4) nothing is downloaded, this message is generated in the Console window:
"CortexR4: GEL Output: Memory Map Setup for Flash @ Address 0x0
CortexR4: Loader: One or more sections of your program falls into a memory region that is not writable. These regions will not actually be written to the target. Check your linker configuration and/or memory map."
PC register = 0x2DF4 (the body of readmsg function linked in from rtsv7R4_T_be_v3D16_eabi.lib)
5) to select "Target_RAM_to_0x0" - error window pops up with a message:
"CortexR4: Trouble Writing Memory Block at 0xffffffcc on Page 0 of Length 0x4: Error 0x80001822/-1141 Fatal Error during: Memory, Execution, Timeout, Target, Processor communication timeout. It is recommended to RESET EMULATOR. This will disconnect each target, perform an emulation reset, and then reconnect each target. Power cycle the target board before continuing."
press on "Cancel" which leads to following error in the console log:
"Target_RAM_to_0x0() cannot be evaluated.
target access failed
at *((int *) 0xffffffcc)=0x00000001 [tms570ls3137.gel:224]
at swap_mem(1) [tms570ls3137.gel:277]
at Target_RAM_to_0x0()
CortexR4: 17 other operation(s) were automatically canceled as a result "
6) to select "CCS_MemMap_RAM_at_0x0 - shown a message:
"CortexR4: GEL Output: Memory Map Setup for RAM @ Address 0x0.CortexR4: GEL Output: For Debugging Only!"
procedure B
1) sys_core.asm:
userSp: .word 0x00000000+0x00000200
svcSp: .word 0x00000000+0x00000200+0x00001200
fiqSp: .word 0x00000000+0x00000200+0x00001200+0x00000200
irqSp: .word 0x00000000+0x00000200+0x00001200+0x00000200+0x00000200
abortSp: .word 0x00000000+0x00000200+0x00001200+0x00000200+0x00000200+0x00000100
undefSp: .word 0x00000000+0x00000200+0x00001200+0x00000200+0x00000200+0x00000100+0x00000100
2) linker file:
/*----------------------------------------------------------------------------*/
/* Memory Map */
MEMORY{
VECTORS (X) : origin=0x00000000 length=0x00000020
STACKS (RW) : origin=0x08000000 length=0x00001300
RAM (RW) : origin=0x08001300 length=0x00007000
}
/*----------------------------------------------------------------------------*/
/* Section Configuration */
SECTIONS{
.intvecs : {} > VECTORS
.text : {} > RAM
.const : {} > RAM
.cinit : {} > RAM
.pinit : {} > RAM
.bss : {} > RAM
.data : {} > RAM
.sysmem : {} > RAM
}
The linker complains:
error #10099-D: placement fails for
object ".intvecs", size 0x20 (page 0). Available ranges:
VECTORS size: 0x20 unused: 0x20 max hole: 0x20
According to MAP file a length of the section .intvecs = 0x48.
To change a line in the linker file:
VECTORS (X) : origin=0x00000000 length=0x00000050
3) to click on "Debug" which ends up with error message:
"CortexR4: GEL Output: Memory Map Setup for Flash @ Address 0x0CortexR4: Loader: One or more sections of your program falls into a memory region that is not writable. These regions will not actually be written to the target. Check your linker configuration and/or memory map.
CortexR4: Flash operation timed out waiting for the algorithm to complete. Operation cancelled.
CortexR4: Trouble Writing Memory Block at 0x8001300 on Page 0 of Length 0x3130
CortexR4: GEL: File: C:\Users\jiri.janacek\workspace_v5_2\Hercules TMS570 Blinky Example\Debug\Hercules TMS570 Blinky Example.out: Load failed."
Do you have any idea what is going wrong? Did I understand the linked post wrongly?
Many thanks in advance,
Jiri