This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
hi,
I am working on the bootloader and an application based on SafeRTOS. My Application is working fine with all pheripherals with booloader ,now i have implemented safety diagnostic library , without bootloader code is working , and for bootloader when i am doing changes in linker , it is not working .
1. bootloader linker file
VECTORS (X) : origin=0x00000000 length=0x00000020 vfill = 0xffffffff
FLASH0 (RX) : origin=0x00000020 length=0x001FFFE0 vfill = 0xffffffff
FLASH1 (RX) : origin=0x00200000 length=0x00200000 vfill = 0xffffffff
SRAM (RWX) : origin=0x08002000 length=0x0002D000
STACK (RW) : origin=0x08000000 length=0x00002000
bootloader invect
resetEntry
b _c_int00
undefEntry
b #0x1ffff8
svcEntry
b #0x1ffff8
prefetchEntry
b #0x1ffff8
dataEntry
b #0x1ffff8
b phantomInterrupt
ldr pc,[pc,#-0x1b0]
ldr pc,[pc,#-0x1b0]
2. application with bootloadrer linker
VECTORS (X) : origin=0x00200000 length=0x00000080 vfill = 0xffffffff
KERN_FUNC (RX) : origin=0x00200080 length=0x0000ff80 vfill = 0xffffffff
FLASH0 (RX) : origin=0x00210000 length=0x001D0000 vfill = 0xffffffff
//FLASH1 (RX) : origin=0x00200000 length=0x00200000 vfill = 0xffffffff // for optimizing bootloader
STACKS (RW) : origin=0x08000000 length=0x00001800
KERN_DATA (RW) : origin=0x08001800 length=0x00000800
RAM (RW) : origin=0x08002000 length=0x0007E000
3 application linker with safety diagnostic
VECTORS (X) : origin=0x00000000 length=0x00000080 vfill = 0xffffffff
KERN_FUNC (RX) : origin=0x00000080 length=0x0000ff80 vfill = 0xffffffff
FLASH0 (RX) : origin=0x00010000 length=0x001F0000 vfill = 0xffffffff
FLASH1 (RX) : origin=0x00200000 length=0x00200000 vfill = 0xffffffff
STACKS (RW) : origin=0x08000000 length=0x00003000
KERN_DATA (RW) : origin=0x08003000 length=0x00002000
RAM (RW) : origin=0x08005000 length=0x0007B000
4 . application with safety diagnostic for bootloader linker
VECTORS (X) : origin=0x00200000 length=0x00000080 vfill = 0xffffffff
KERN_FUNC (RX) : origin=0x00200080 length=0x0000ff80 vfill = 0xffffffff
FLASH0 (RX) : origin=0x00210000 length=0x001D0000 vfill = 0xffffffff
//FLASH1 (RX) : origin=0x00200000 length=0x00200000 vfill = 0xffffffff // for optimizing bootloader
STACKS (RW) : origin=0x08000000 length=0x00003000
KERN_DATA (RW) : origin=0x08003000 length=0x00002000
RAM (RW) : origin=0x08005000 length=0x0007B000
first two combination of bootloader and application is working . but iam trying to do this with safety diagnostic library when the enable interrupt is called at first line it goes iin this error
Break at address "0x4" with no debug information available, or outside of program code.
Hi Praveen Kumar,
I started working on this issue and will provide you my update ASAP.
--
Thanks & regards,
Jagadish.
Hi Praveen kumar,
Can you please try to increase the stack further and test it again?
STACKS (RW) : origin=0x08000000 length=0x00003000
Try to make the stack size to 0x00006000 length if possible?
--
Thanks & regards,
Jagadish.
hi jagadish i have tried this but geeting same issue
i am attaching the memory allocation of code
Hi Praveen Kumar,
Is it possible for you to share your complete project for debugging purposes?
Even you can send a private message as well? or else any simplest project with the issue?
--
Thanks & regards,
Jagadish.
hi jagadish , ok i let u know mean while can you just help me out with this setting of linker used in safety diagnostic when i am disabling PROFILE data line the code does not run this was taken from and example code of safety library
.intvecs palign(32), START( lnkStartFlashAddress ),START( lnkKernelFuncStartAddr )
fill =0xffffffff {} > VECTORS
.kernel_function END( lnkKernelFuncEndAddr ) :
{
*(KERNEL_FUNCTION)
} > KERN_FUNC
.unpriv_flash palign(32), END( lnkEndFlashAddress ) :
{
*(.text)
*(.const)
} > FLASH0
.cinit align(32) : {} > FLASH0
.pinit align(32) : {} > FLASH0
STACK_DATA START( lnkKernelDataStartAddr ) : {} > STACKS
KERNEL_DATA END( lnkKernelDataEndAddr ) : {} > KERN_DATA
.bss : {} > RAM
.data : {} > RAM
.sysmem : {} > RAM
LOG_DATA: > RAM //LOG
PROFILE_DATA: > RAM //PROFILE
Hi Praveen,
Apologies for the late reply.
Why are you not allocating some particular length to the PROFILE area like as below
Just try to allocate some length to the PROFILE_DATA and LOG_DATA, then verify.
--
Thanks & regards,
Jagadish.
hi jagadish ,
thsi profile data linker setting is working when my code is starts from 0x00000 but it not working with bootloader where u change stat adress 0x0020000
can you provide me any safety diagnostic example code (baremetal/ frre rtos based) which is working with bootloader
Hi Praveen Kumar,
can you provide me any safety diagnostic example code (baremetal/ frre rtos based) which is working with bootloader
I even checked with my senior colleague and unfortunately, we don't have any example code for this.
--
Thanks & Regards,
Jagadish.