Skip to content

Commit 65b6883

Browse files
Define correct size for RAM
This was previously hardcoded to a single value, but is now derived from the STM32 chip-specific header files.
1 parent 1446bb4 commit 65b6883

File tree

1 file changed

+4
-2
lines changed
  • cores/arduino/avr

1 file changed

+4
-2
lines changed

cores/arduino/avr/io.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,10 @@
2525
#ifndef _IO_H_
2626
#define _IO_H_
2727

28-
#define RAMSTART 0x20000000
29-
#define RAMSIZE (20 * 1024)
28+
#include <stm32l0xx.h>
29+
30+
#define RAMSTART (SRAM_BASE)
31+
#define RAMSIZE (SRAM_SIZE_MAX)
3032
#define RAMEND (RAMSTART + RAMSIZE - 1)
3133

3234
#define E2END 0xfff

0 commit comments

Comments
 (0)