Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » How do I set the FLASH address
How do I set the FLASH address [message #1847835] Tue, 09 November 2021 20:00 Go to next message
Michael Von Ahnen is currently offline Michael Von AhnenFriend
Messages: 1
Registered: November 2021
Junior Member
I am converting a project from another tool and while I am able to compile and link the project, it is not picking up the FLASH and RAM memory addresses for the linker to link the project. The result the FLASH address is being set to 0x8000.

I don't see anywhere to specifically set these in the project.

The target processor is the GD32F303CGT6

The toolchain is GNU Tools for ARM Embedded Processors (arm-none-eabi-gcc)

In the project, the memory map is defined in a header file (gd32f30x.h). Here is part of the definition:

/* main flash and SRAM memory map */
#define FLASH_BASE ((uint32_t)0x08000000U) /*!< main FLASH base address */
#define SRAM_BASE ((uint32_t)0x20000000U) /*!< SRAM0 base address */
#define OB_BASE ((uint32_t)0x1FFFF800U) /*!< OB base address */
#define DBG_BASE ((uint32_t)0xE0042000U) /*!< DBG base address */
#define EXMC_BASE ((uint32_t)0xA0000000U) /*!< EXMC register base address */

/* peripheral memory map */
#define APB1_BUS_BASE ((uint32_t)0x40000000U) /*!< apb1 base address */
#define APB2_BUS_BASE ((uint32_t)0x40010000U) /*!< apb2 base address */
#define AHB1_BUS_BASE ((uint32_t)0x40018000U) /*!< ahb1 base address */
#define AHB3_BUS_BASE ((uint32_t)0x60000000U) /*!< ahb3 base address */

  • Attachment: gd32f30x.h
    (Size: 26.78KB, Downloaded 45 times)
Re: How do I set the FLASH address [message #1847847 is a reply to message #1847835] Wed, 10 November 2021 10:28 Go to previous message
Tauno Voipio is currently offline Tauno VoipioFriend
Messages: 742
Registered: August 2014
Senior Member
You have to change the linker script. It is the tool to describe the address ranges to the final binary file.

Get the GNU ld manual and read about linker scripts. GNU ld is a part of the GNU binutils package.


Tauno Voipio
Previous Topic:Debugger Issue
Next Topic:How to reset all personal settings to default
Goto Forum:

Current Time: Wed Dec 06 04:26:55 GMT 2023

Powered by FUDForum. Page generated in 0.01902 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top