cancel
Showing results for 
Search instead for 
Did you mean: 

How to include Flash Driver into SPC5Studio project?

Yannek
Associate III

Hi,

I am trying to include Flash Driver component into my project of SPC560B50L1.

I have added it from available components and it appeared in project as shown on attached screenshot.

Then I wrote simple procedure, but linker says that flash driver's functions references are undefined (on attached screenshot).

Is there something more I need to do in order to use flash driver's functions?

0690X00000ButzFQAR.png

Second question: Is there an example C code of flash erasing/writing procedure? Like for other low level drivers?

As I can see, flash driver does not reveal source code and it is quite complicated to set up all related registers in proper order. It would be very useful to have an example to relate to.

Best regards,

Yannek

7 REPLIES 7
Piranha
Chief II

Look carefully at the log - those are linker errors and indicate that function implementation (not declaration) can't be found.

Yes, I know it is linker error.

The point is, that I use embedded components. Since this is not my code, I expect to follow the procedure and be able to use the driver's functions (compile, link, put into UC, run). Yet I can't. It is a matter of environment, which is quite new for me.

Moreover, source files attached to the project do not contain code, but binary tables (and header files). So I cannot simply cut some code and create own driver...

Piranha
Chief II

The functions must be either as a source code in *.c files or in a precompiled libraries, which then must be linked.

Giuseppe DI-GIORE
ST Employee

Hello,

in order to get ​a reference application for Flash Driver do the following:

  • Open SPC5Studiio
  • Click on "Import samples from application library"
  • Select:
    • Family: SPC56
    • Product line: B7C-Line
    • Device: SPC560B50L3
  • Click on Next
  • In the Drivers column, select Flash
  • Select Flash Test Application
  • Clck on Finish

Even if your device is SPC560B50L1, the Flash Test application for SPC560BL3 is pretty much the same.

See also attached picture.

Regards,

Giuseppe

Yannek
Associate III

Thank you, I will try to build the example into my code.

Is it possible to get a source code of Flash and Eeprom Drivers in order to adjust it to own needs?

I have just discovered another related issue: is it intended, that I can use only one from Eeprom Emulation Driver and FlashDriver in my project?

Until I don't use any of them in my project - I can include both:

0690X00000ByHcVQAV.png

But, when I include both - there is a conflict, because both drivers have function FlashInit(). Compiler reports it as error:

0690X00000ByHdOQAV.png

Moreover, if I already have one of these drivers in my project - the second one dissapears from the list of available components (yet, it can be found in "incompatible components"):

0690X00000ByHdYQAV.png

I think I could rename one function, but I wonder if these drives don't share the same CPU's resources (so they cannot be used together, indeed?).

Erwan YVIN
ST Employee

Hello Yannek ,

Sorry, We have not checked the coexistenz of EEprom and Flash Component in the same test application.

you can try to update ssd_c90fl.h by adding a preprocessing in order not to redefine FlashInit.

We are using the same Flash Driver mecanism

I am submitting a CR .. you have not the only customer to request this functionality.

Best regards

Erwan

Yannek
Associate III

Hi Erwan,

Is it possible to get a source code of Flash and Eeprom Drivers in order to adjust it to own needs?

Best,

Yannek