Difference between revisions of "Adding Support for New Devices"

From SEGGER Wiki
Jump to: navigation, search
(Created page with "This article describes how to create a CMSIS based flash loader using SEGGER Embedded Studio. The flash loader can be added to the J-Link DLL and from there on used with any J...")
 
Line 1: Line 1:
This article describes how to create a CMSIS based flash loader using SEGGER Embedded Studio. The flash loader can be added to the J-Link DLL and from there on used with any J-Link DLL based application like for example J-Flash, J-Link Commander, IDEs, etc...This article assumes that there is a basic understanding of the CMSIS flash algorithm structure defined by ARM as well as method of adding new devices using the Open Flash Loader concept. It refers to an Embedded Studio example project for the ST STM32F2xx device series.
+
This article describes how to create a CMSIS based flash loader using SEGGER Embedded Studio. The elf file output (flash algorithm) can be added to the J-Link DLL and from there on used with any J-Link DLL based application like for example J-Flash, J-Link Commander, IDEs, etc...This article assumes that there is a basic understanding of the CMSIS flash algorithm structure defined by ARM as well as method of adding new devices using the Open Flash Loader concept. It refers to an Embedded Studio example project for the ST STM32F205RC device.
   
 
== Debug Configurations ==
 
== Debug Configurations ==
Line 5: Line 5:
 
*Debug
 
*Debug
 
*Release
 
*Release
 
 
=== Debug configuration ===
 
=== Debug configuration ===
 
This configuration allows to debug the flash algorithm in Embedded Studio. The configuration includes a main.c containing the typical function call order, executed by the J-Link DLL when programming a sector. The debug optimization level for this configuration is set to zero.
 
This configuration allows to debug the flash algorithm in Embedded Studio. The configuration includes a main.c containing the typical function call order, executed by the J-Link DLL when programming a sector. The debug optimization level for this configuration is set to zero.
 
=== Release configuration ===
 
=== Release configuration ===
This configuration does not allow debugging but creates the output elf file which can be referenced from within the JLinkDevices.xml file as "''Loader''".
+
This configuration does not allow debugging but creates the output elf file which can be referenced from within the JLinkDevices.xml file as "''Loader''". The debug optimization is set to 3, optimized for speed.
  +
== Included files ==
  +
{| class="wikitable"
  +
|-
  +
! Filename !! Content
  +
|-
  +
| '''FlashDev.c''' || Flash device description for the ST STM32F205RC
  +
|-
  +
| '''FlashOS.h''' || Function prototypes, definitions and structures
  +
|-
  +
| '''FlashPrg.c''' || Flash algorithm itself (e.g. ProgramPage(), EraseSector()
  +
|-
  +
| '''main.c''' || Flash algorithm debug code (used by debug configuration, only)
  +
|-
  +
| '''Cortex_M_Startup.s''' || Cortex-M startup code (used by debug configuration, only)
  +
|-
  +
| '''MemoryMap.xml''' || Memory map of the ST STM32F205RC
  +
|-
  +
| '''Placement_debug.xml''' || Debug configuration section placement file.
  +
|-
  +
| '''Placement_release.xml''' || Release configuration section placement file.
  +
|-
  +
| '''thumb_crt0.s''' || Initialization file (used by debug configuration, only)
  +
|}

Revision as of 11:25, 21 July 2016

This article describes how to create a CMSIS based flash loader using SEGGER Embedded Studio. The elf file output (flash algorithm) can be added to the J-Link DLL and from there on used with any J-Link DLL based application like for example J-Flash, J-Link Commander, IDEs, etc...This article assumes that there is a basic understanding of the CMSIS flash algorithm structure defined by ARM as well as method of adding new devices using the Open Flash Loader concept. It refers to an Embedded Studio example project for the ST STM32F205RC device.

Debug Configurations

The example project contains two debug configurations:

  • Debug
  • Release

Debug configuration

This configuration allows to debug the flash algorithm in Embedded Studio. The configuration includes a main.c containing the typical function call order, executed by the J-Link DLL when programming a sector. The debug optimization level for this configuration is set to zero.

Release configuration

This configuration does not allow debugging but creates the output elf file which can be referenced from within the JLinkDevices.xml file as "Loader". The debug optimization is set to 3, optimized for speed.

Included files

Filename Content
FlashDev.c Flash device description for the ST STM32F205RC
FlashOS.h Function prototypes, definitions and structures
FlashPrg.c Flash algorithm itself (e.g. ProgramPage(), EraseSector()
main.c Flash algorithm debug code (used by debug configuration, only)
Cortex_M_Startup.s Cortex-M startup code (used by debug configuration, only)
MemoryMap.xml Memory map of the ST STM32F205RC
Placement_debug.xml Debug configuration section placement file.
Placement_release.xml Release configuration section placement file.
thumb_crt0.s Initialization file (used by debug configuration, only)