From a11e12b94302a237afd5b8e4f17e8cbb51279752 Mon Sep 17 00:00:00 2001 From: philsson Date: Thu, 29 Sep 2016 08:57:27 +0200 Subject: [PATCH] LinkerScript.ld addition for EEPROM memory address --- UAV-ControlSystem/.cproject | 3 +++ UAV-ControlSystem/LinkerScript.ld | 1 + UAV-ControlSystem/src/drivers/system_clock.c | 2 -- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/UAV-ControlSystem/.cproject b/UAV-ControlSystem/.cproject index 3f1288d..beadf65 100644 --- a/UAV-ControlSystem/.cproject +++ b/UAV-ControlSystem/.cproject @@ -44,6 +44,7 @@ + @@ -139,6 +140,7 @@ + @@ -214,4 +216,5 @@ + diff --git a/UAV-ControlSystem/LinkerScript.ld b/UAV-ControlSystem/LinkerScript.ld index 83e93ae..0e2c315 100644 --- a/UAV-ControlSystem/LinkerScript.ld +++ b/UAV-ControlSystem/LinkerScript.ld @@ -63,6 +63,7 @@ MEMORY { RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K ROM (rx) : ORIGIN = 0x8000000, LENGTH = 512K + EEPROM (xrw) : ORIGIN = 0x80E0000, LENGTH = 128K } /* Sections */ diff --git a/UAV-ControlSystem/src/drivers/system_clock.c b/UAV-ControlSystem/src/drivers/system_clock.c index 44510b9..8a5eca0 100644 --- a/UAV-ControlSystem/src/drivers/system_clock.c +++ b/UAV-ControlSystem/src/drivers/system_clock.c @@ -76,8 +76,6 @@ uint32_t clock_get_us() asm volatile("\tnop\n"); } while (ms != clock_get_ms()); - assert_param(us >= 1000); - return (ms * 1000) + (usTicks * 1000 - cycle_cnt) / usTicks; }