mirror of
https://github.com/Ralim/IronOS.git
synced 2025-02-26 07:53:55 +00:00
Make flash and bootloader sizes configurable
This patch makes allocating special pages automatic and flexible, allowing flash size and application start offset specification with linker command line arguments. It should allow easier porting to different targets and experimentation without adding code complexity. Many original STM32F103x8 chips have fully functional 128 kiB flash and so this additional space might come useful for experimentation, additional optional features etc. Tested on v2.51A board, including writing and verifying 128 kiB of random data. Make variables are added to control that, so to build for the full undocumented flash size and dapboot configured to start the app from 8 kiB offset one can run: make flash_size=128k bootldr_size=0x2000
This commit is contained in:
@@ -12,9 +12,7 @@
|
||||
#include "Setup.h"
|
||||
#include "../../configuration.h"
|
||||
#include "BSP.h"
|
||||
#define FLASH_ADDR \
|
||||
(0x8000000 | \
|
||||
0xFC00) /*Flash start OR'ed with the maximum amount of flash - 1024 bytes*/
|
||||
|
||||
#include "string.h"
|
||||
volatile systemSettingsType systemSettings;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user