Defining a new reference in Bootloader

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
AnWa_1259496
Level 4
Level 4
Welcome! 50 replies posted 25 replies posted

Using the BLE shared memory bootloader

   

I am trying to define a block of flash for use for configuration data in the bootloadable application. But this flash should not be affected by a bootload operation. So I am thinking the block should be defined within the bootloader app.

   

I have done the following:

   

In the bootloader, added: const uint8 DL_FLASH_BLOCK[256];

   

In the bootloadable I have added this as an EXTERN in SharedProjectAPI.h

   

Recompiled the bootloader project

   

Ran the MK.BAT file

   

Recompiled the bootloadable project but get "Undefined reference to DL_FLASH_BLOCK"

   

How do I get the reference to carry across from the bootloadable to bootloader?

0 Likes
5 Replies
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

In bootloadable parameters you have the ability to define start address

   

of the bootloadable. So in bootloader define an absolute address

   

at end of bootloader and set that aside with a variable/struc definition.

   

That address of course would be below the start address of bootloadable

   

and end of bootloader.

   

 

   

To define absolute address see -

   

 

   

    

   

          http://www.cypress.com/?rid=91945     AN89610 - PSoC® 4 and PSoC 5LP ARM Cortex Code Optimization

   

 

   

Then in bootloadable define a pointer with the absolute address and

   

same type as you set in bootloader.

   

 

   

If you look in the bootloader.h file you will see a const Bootloader_1_SizeBytes, maybe that would

   

be useful in the metadata f() call in bootloadable ? Not sure about this. To determine address.

   

 

   

Regards, Dana.

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

I just saw this, might solve your problem -

   

 

   

    

   

          

   

http://www.cypress.com/?rid=110097     Project #029: Supervisory Flash on PSoC 4 BLE

   

 

   

 

   

Regards, Dana.

0 Likes
AnWa_1259496
Level 4
Level 4
Welcome! 50 replies posted 25 replies posted

 Thanks, that looks very useful.

0 Likes
AnWa_1259496
Level 4
Level 4
Welcome! 50 replies posted 25 replies posted

 I cant get any of the files to download from that GitHub site.

   

The zip files all come up "invalid format" and the individual files seem to be there but not the project structure. For exmple the .cydsn file is actually just a link not a design file. I am confused!

   

There seems to be a lot of useful projects on there though. Is there some trick?

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

Wierd nomenclature but click "RAW" and that will let you doiwnload.

   

 

   

Regards, Dana.

0 Likes