Booting code via UART - Code size (hex file) higher than RAM size

⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.wsdof.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
6 posts / 0 new
Last post
Ezza
Offline
Last seen:1 year 6 months ago
Joined:2017-09-07 11:33
Booting code via UART - Code size (hex file) higher than RAM size

Hi,
I'm trying to boot theSDK 5.0.4 ble_app_peripheral examplecode using UART protocol into the DA14580 device.
I have followed the steps from:DA1458x Booting from serial interface doc.
The booting fails because of the fact that the example code size (hex file) is 58KB while the DA14580 RAM size is about 43KB.
i.e. when I sent the LEN_LSB and LEN_MSB (which is 58,187) I recieve NACK from the device.

How come the code examles size does not fit the component size? Is there any workaround for this issue?

Device:
STS_Dialog (not verified)
Hi ezza,

Hi ezza,

You check the hex file not the binary, when you compile your code with Kyle a .hex file is produced, this file doesn't put into M0 but the .bin file. This procedure can be made automatically from Smart Snippet Tolls (convert hex to binary) when you browse the file.

BR,

STS_Dialog.

Ezza
Offline
Last seen:1 year 6 months ago
Joined:2017-09-07 11:33
Hi,

Hi,

Thanks for the reply.

I have converted the .hex to .bin using Intel HEX to BINARY File Converter Utility, and the created file was even bigger than the hex file.

STS_Dialog (not verified)
Hi,

Hi,

Please try it from hex2bin.exe which is located in suota tools zip. from Tutorials in Documents tab.

BR,

STS_Dialog.

Ezza
Offline
Last seen:1 year 6 months ago
Joined:2017-09-07 11:33
Thanks agian.

Thanks agian.

The hex2bin.exe gives the same output as intel's tool.
Please see the attached screenshot.

The size of the bin file is very big. It cannot fit the device's RAM.
Correct me if I'm missing something, this is my psaudo code:

1. Send reset request.
2. Read response from the device (0x02).
3. Send SOH = 0x01 to the device.
4. Send the code's length (LSB then MSB).
5. Receive ACK or NACK from the device (in my case because the length is too big i got NACK, I tried redusing it and I got the ACK).
6. Send code's bytes to the device.
7. Recieve CRC from the device.
9. Send ACK to the Device.

Attachment:
STS_Dialog (not verified)
Hi,

Hi,

I have tested it, it's about 21KB, have you add something in the code?

BR,

STS_Dialog