AnsweredAssumed Answered

Hal vs Cmsis drivers (firmware,bootloader,flashmemory)

Question asked by ohayo.John on Aug 31, 2016
Latest reply on Aug 23, 2017 by Manikandan K
Hello everyone,

First of all I would like to specify that I am working on a embedded project.Nowadays I am trying to write firmware operation for stm32 bit arm processor named as stm32f103c8t6.

I want to add a new feature to the project to be programmed remotely.For this process, I am using an external eeprom to store recieved data from gps module and Flash memory operation.

The idea is; 
The recieved main program data(firmware) from FTP server will be stored in external eeprom and then Microcontroller will overwrite this data in the flash memory .Thus, Bootloader will start new firmware after reset and identify it as a new software for the future applications.It is basically "update" operation for microcontroller.

So, In this case I already wrote flash memory(send and recieve data with initialization) and eeprom(send and recieve) codes.

In the last part,  Flash memory data should be loaded with bootloader.

I follow this tutorial to arrange specifications of microcontroller(remapping vector table,ram memory, bootloader data size...)
http://marcelojo.org/marcelojoeng/2015/09/bootloader-on-stm32f0.html

(I am using Keil for programming in C/C++)
My first problem is;
I hadn't create system program with hal drivers, Therefore I am not able to use these codes based on CMSIS drivers for Bootloader which is available in above tutorial.

Briefly, I can not use related Real time clock control(Rcc) codes with Cmsis drivers;

__HAL_RCC_AHB_FORCE_RESET();
 
    //  Enable SYSCFG peripheral clock
    __HAL_RCC_SYSCFG_CLK_ENABLE();
 
    __HAL_RCC_AHB_RELEASE_RESET();
 
    // Remap RAM into 0x0000 0000
    __HAL_SYSCFG_REMAPMEMORY_SRAM();

Is there anyway to identify same operation codes with Cmsis Rcc library? and could you please inform me what are these codes in CMSIS based.

Second problem is;

I am using arm compiler mode instead of Gnu gcc compiler.Therefore I can not create any linker file to arrange memories for this project.It only supports scatter file.
But I have no idea how to construct it according to giving tutorial which is available above.

Could you please help me under these conditions(including scatter file).

Any help will be apreciated.
Thank you by now.

Outcomes