6 posts / 0 new
Last post
Vivek
Offline
Last seen:2 years 3 months ago
加入:2017-07-08 07:11
External Controller Bootloading

Hi,

我们要有t的形象he DA14580 part of the external microcontroller.
In your projects you are saving the image in form of an array - "static const char program_t[IMAGE_SIZE] __attribute__((aligned(64))) = {"
Is there a tool to convert a .bin file to such an array?
How can I produce the array to store in my microcontroller

Keywords:
Device:
Jelphi
Offline
Last seen:3 months 4 days ago
Staff
加入:2015-09-10 12:07
sir 你能不用中文描述下你的用法呢?

sir

你能不用中文描述下你的用法呢?

Vivek
Offline
Last seen:2 years 3 months ago
加入:2017-07-08 07:11
Hi,

Hi,

I am looking for a tool to convert the Intel Hex file into a array, as the array can be used for serial bootloading. As shown in the SDK 5.0.4 example code

SDK 5.0.4\DA1458x_SDK_5.0.4\DA1458x_SDK\5.0.4\projects\host_apps\da1458x\proximity\reporter\include\prox_reporter_ext.h file.

Jelphi
Offline
Last seen:3 months 4 days ago
Staff
加入:2015-09-10 12:07
Hi Sir

Hi Sir

it's easy to find a Hex2bin, actually our utlitiy: utilities\mkimage, this tool convert a Hex file to bin and then add some header and more info and eventually create a image file, I think you can take use of this project and get what you want

Vivek
Offline
Last seen:2 years 3 months ago
加入:2017-07-08 07:11
Hi,

Hi,

This file gives me an image file.
I am looking for formatting the output hex file into a file shown in
prox_reporter_ext.h
as given in
\SDK 5.0.4\DA1458x_SDK_5.0.4\DA1458x_SDK\5.0.4\projects\host_apps\da1458x\proximity\reporter\include

which will be used by the external processor to serially bootload the Dialog chip.

Excerpt of prox_reporter_ext.h file as follows -

#define IMAGE_SIZE 16268 // Image size in bytes

// Image data - MUST BE ALIGNED(64)
static const char program_t[IMAGE_SIZE] __attribute__((aligned(64))) = {
0x00,0x98,0x00,0x20,0xa1,0x04,0x00,0x20,0xa9,0x04,0x00,0x20,0xc1,0x04,0x00,
0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xd9,
0x04,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf1,0x04,0x00,0x20,
0xf3,0x04,0x00,0x20,0xab,0x28,0x00,0x20,0x9f,0x29,0x00,0x20,0x0d,0x31,0x03,
0x00,0x8d,0x29,0x00,0x20,0x13,0x29,0x00,0x20,0x8d,0x31,0x03,0x00,0xb1,0x29,
0x00,0x20,0xb9,0x29,0x00,0x20,0xf5,0x04,0x00,0x20,0x4b,0x23,0x00,0x20,0xd1,
0x29,0x00,0x20,0xad,0x31,0x03,0x00,0x57,0x81,0x02,0x00,0xf5,0x04,0x00,0x20,
0xf5,0x04,0x00,0x20,0x93,0x22,0x00,0x20,0xf5,0x04,0x00,0x20,0xf5,0x04,0x00,
0x20,0xf5,0x04,0x00,0x20,0x95,0x20,0x00,0x20,0x99,0x20,0x00,0x20,0x9d,0x20,
0x00,0x20,0xa1,0x20,0x00,0x20,0xa5,0x20,0x00,0x20,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,

Qinjiny_Dialog
Offline
Last seen:1 week 5 days ago
Staff
加入:2016-11-01 05:47
Hi, Vivek,

Hi, Vivek,

The tool you need can be easily found online. Check this post for example:

http://www.keil.com/support/docs/2218.htm

Also, please post in the English forum if you're native English speaker :)