ΣSigmaStudio Ask AI Русский Log in

Build warning

Processors & DSP SVarghaei385 Aug 28, 2019 00:00 6 replies Original on forum ↗
Subscribe
SVarghaei385 Question
Aug 28, 2019 00:00

Hi,

I am trying to write a .ldr file into a buffer:

char LDR_PATH[] = {
#include C:/WorkSpace/Test.ldr"
};

But I get a lot of warnings and errors during build:

warning: null (zero) character in input line ignored

error: unrecognized token

My next question is:

How is that possible to write the .ldr file into a flash pr. each sector?

I am new and trying to learn, so be easy on me.

Thanks

bf706

blackfin

StuartS Reply
Aug 28, 2019 00:00

Hi,

You'll need the elfloader include format output setting. See the "Loader Output Files in Include Format" CCES help topic and adjust your Boot format (-f) loader setting accordingly for the project that created Test.ldr.

Regards,
Stuart.

SVarghaei385 Reply
Aug 29, 2019 00:00

Hi Stuart,

Thank you for your support.

I have just changed the "Boot format -f" from ASCII to Include as follow:

I have similar lines in my code:

const unsigned loader_file[] =
{
#include "foo.ldr"
};
const unsigned loader_file_count = sizeof loader_file
/ sizeof loader_file[0];

the size of the loader_file_count is 36739 and the number of buffer is 36738 and I get following warning:

warning: last line of file ends without a newline

when I open the .ldr with LdrViewer, it looks like follow:

Could please tell me, how can I understand the values in the buffer with values from LdrViewer?

Br.

SVA

pastedimage1567067798862v3.png
pastedimage1567067798862v3.png
pastedimage1567067602652v2.png
pastedimage1567067602652v2.png
pastedimage1567067207965v1.png
pastedimage1567067207965v1.png
StuartS Reply
Aug 29, 2019 00:00

I reproduced the newline warning when using the -finclude output file. This warning can be safely suppressed or ignored. I will enter a JIRA issue to get it fixed so that elfloader inserts the missing newline.

To suppress this warning you can insert a use of #pragma diag on the line before the definition of loader_file as shown below:

#pragma diag(suppress:1:"Suppress spurious missing newline warning")
Take a look at "Boot Loader Stream" in BF70x_BlackfinProcessorHardwareReference.pdf to get a better understanding of the boot loader stream.

Regards,
Stuart.

SVarghaei385 Reply
Aug 29, 2019 00:00

Thank you.

Do you have any example code regarding writing a .ldr into a flash?

Br.

SVA

StuartS Reply
Aug 29, 2019 00:00

Is it just a boot image you want to put into flash? If that's the case, you only need to use the cldp (command-line device programmer). There should be an example command line in the BF707 BSP POST example readme.

If it is memory-mapped code or data that's more involved and I'll need to check on what's involved.

Regards,

Stuart.

SVarghaei385 Reply
Aug 29, 2019 00:00

Now I am using JTAG (emulator board) to program our HW, but I have to make a bootloader to boot the flash via CAN communication.

Our customer Software Interface is connected to our customer HW via CAN, and have to make the HW to run the application.

So I suppose memory-mapped code.

Br.

SVA