I am using the NRF Connect SDK package provided by Qorvo, and adding BLE functions to their package.
I am now trying to debug my added code.
I am using Ozone as the debugger.
if I locate my code at 0, it boots and crashes when it want to talk to the softdevice.. (good, as expected) but I can use ozone to step thru the code,
the app entrypoint is correct.,
if I locate my code at x027000 (S140) for the softdevice blob to be at 0,
and use both files in the NRF Connect programmer, the layout looks as expected with the correct location and sizes
but it doesn't setup as expected (without debugging) which means I have a bug somewhere (not unexpected)
so I want to use Ozone, but the LD builds only my app
I have found other instructions that say I can load the softdevice binary in the build and place it at 0, and have the combined ELF
https://m0agx.eu/nordic-softdevice-unofficial-survival-guide.html
BUT the linker freaks out with the INPUT(binary_file) and produces a mess
ld file
TARGET(binary)
INPUT("../../../../SDK_BSP/Nordic/NORDIC_SDK_17_1_0/components/softdevice/s140/hex/s140_blob_and_mbr.bin")
OUTPUT_FORMAT(default)
MEMORY
{
FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 1M
CALIB_SHA (rw) : ORIGIN = 0x000FE000, LENGTH = 4K
CALIB (rw) : ORIGIN = 0x000FF000, LENGTH = 4K
RAM (rwx) : ORIGIN = 0x20002000, LENGTH = 256K - 8k
}
SECTIONS
{
.text 0x0 : {
"../../../../SDK_BSP/Nordic/NORDIC_SDK_17_1_0/components/softdevice/s140/hex/s140_blob_and_mbr.bin"
}
/* start with interrupt vectors */
.text 0x27000 :
{
/*. = ALIGN(4); */
KEEP(*(.isr_vector)) /* Startup code */
...
from the map file
Memory region Used Size Region Size %age Used
FLASH: 208968 B 1 MB 19.93%
CALIB_SHA: 32 B 4 KB 0.78%
CALIB: 4 KB 4 KB 100.00%
RAM: 248198188 B 248 KB 97734.29%
I've also tried with
FLASH (rx) : ORIGIN = 0x00027000, LENGTH = 1M - 156K - 4K - 4K */ /* 1M minus calib_sha/calib sections. */
as soon as the INPUT(binary file) is added, the build falls apart. ld 2.38 is the latest for my platform.
are there any other guides for this?