GD32F4xx Project Properties
Projects creating using the project templates in this support package have the following device specific project properties:
Heap Size
The heap size is set to be 256 bytes when a project is created.
The heap size can be modified using the Heap Size project property.
Section Placement
You can select the memory configuration you require using the Section Placement
project property.
For GD32F4xx projects, the set of placements are:
- Flash - The application runs in internal Flash memory (default).
- Flash Vectors In RAM - The application runs in internal Flash memory and exception vectors are copied to RAM memory.
- Flash Copy To RAM - The application starts in internal flash and copies itself to run from internal RAM memory.
- RAM - The application runs from internal RAM memory only.
Stack Sizes
The main stack size is set to be 256 bytes when a project is created.
The process stack size is set to be 0 bytes when a project is created.
The main and process stack sizes can be modified using the Main Stack Size and Process Stack Size project properties.
To change the location of the stacks, edit the section placement file and place the .stack and .stack_process sections as required.
Startup From Reset
By default, the application will only startup from power-on/reset in Release configuration.
This acts as a safety net in case you accidently download a program in FLASH during development that crashes and prevents the
debugger from taking control of the target over the debug interface thus rendering the device unusable.
For GD32F4xx projects, the Startup From Reset project property can be set to one of the following:
- No - The application will not startup from reset.
- Release Only - The application will only startup from reset when built in Release configuration (default).
- Yes - The application will always startup from reset.
Target Processor
Once a project has been created you can target different devices by modifying the Target Processor project property.
See the GD32F4xx Devices section for details on the files, preprocessor definitions and macro definitions used when a device is selected.
Clock Configuration
The Build Options > Clock Configuration project property can be set to one fo the following:
- 16 MHz Using 16 MHz Internal Oscillator - The startup code will configure the device to run at 16 MHz using the internal RC oscillator.
- 8 MHz Using 8 MHz External Oscillator - The startup code will configure the device to run at 8 MHz using an external 8 MHz oscillator.
- 16 MHz Using 16 MHz External Oscillator - The startup code will configure the device to run at 16 MHz using an external 16 MHz oscillator.
- 25 MHz Using 25 MHz External Oscillator - The startup code will configure the device to run at 25 MHz using an external 25 MHz oscillator.
- 120 MHz Using 16 MHz Internal Oscillator - The startup code will configure the device to run at 120 MHz using the internal RC oscillator.
- 120 MHz Using 8 MHz External Oscillator - The startup code will configure the device to run at 120 MHz using an external 8 MHz oscillator.
- 120 MHz Using 25 MHz External Oscillator - The startup code will configure the device to run at 120 MHz using an external 25 MHz oscillator.
- 168 MHz Using 16 MHz Internal Oscillator - The startup code will configure the device to run at 168 MHz using the internal RC oscillator.
- 168 MHz Using 8 MHz External Oscillator - The startup code will configure the device to run at 168 MHz using an external 8 MHz oscillator.
- 168 MHz Using 25 MHz External Oscillator - The startup code will configure the device to run at 168 MHz using an external 25 MHz oscillator.
- 200 MHz Using 16 MHz Internal Oscillator - The startup code will configure the device to run at 200 MHz using the internal RC oscillator (default).
- 200 MHz Using 8 MHz External Oscillator - The startup code will configure the device to run at 200 MHz using an external 8 MHz oscillator.
- 200 Mhz Using 25 MHz External Oscillator - The startup code will configure the device to run at 200 MHz using an external 25 MHz oscillator.