-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ld: refactor sam0 ldscripts #7739
Changes from all commits
4d681ac
d25fd64
4c86d95
a7a41ad
ec9897f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,8 +16,9 @@ ifeq ($(PROGRAMMER),jlink) | |
include $(RIOTMAKE)/tools/jlink.inc.mk | ||
else | ||
# by default, we use BOSSA to flash this board to take into account the | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the comment needs updating |
||
# pre-flashed Arduino bootloader | ||
export LINKER_SCRIPT ?= $(RIOTCPU)/sam0_common/ldscripts/$(CPU_MODEL)_arduino_bootloader.ld | ||
# pre-flashed Arduino bootloader. ROM_OFFSET skips the space taken by | ||
# such bootloader. | ||
ROM_OFFSET ?= 0x2000 | ||
include $(RIOTMAKE)/tools/bossa.inc.mk | ||
endif | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,14 @@ | ||
# include module specific includes | ||
INCLUDES += -I$(RIOTCPU)/cortexm_common/include | ||
INCLUDES += -I$(RIOTCPU)/cortexm_common/include/vendor | ||
|
||
ifneq (,$(ROM_OFFSET)) | ||
LINKFLAGS += $(LINKFLAGPREFIX)--defsym=_rom_offset=$(ROM_OFFSET) | ||
endif | ||
|
||
ifneq (,$(ROM_START_ADDR)$(RAM_START_ADDR)$(ROM_LEN)$(RAM_LEN)) | ||
LINKFLAGS += $(LINKFLAGPREFIX)--defsym=_rom_start_addr=$(ROM_START_ADDR) | ||
LINKFLAGS += $(LINKFLAGPREFIX)--defsym=_ram_start_addr=$(RAM_START_ADDR) | ||
LINKFLAGS += $(LINKFLAGPREFIX)--defsym=_rom_length=$(ROM_LEN) | ||
LINKFLAGS += $(LINKFLAGPREFIX)--defsym=_ram_length=$(RAM_LEN) | ||
endif |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
* Copyright (C) 2017 Inria | ||
* | ||
* This file is subject to the terms and conditions of the GNU Lesser | ||
* General Public License v2.1. See the file LICENSE in the top level | ||
* directory for more details. | ||
*/ | ||
|
||
/** | ||
* @addtogroup cpu_cortexm_common | ||
* @{ | ||
* | ||
* @file | ||
* @brief Memory definitions for the Cortex-M family | ||
* | ||
* @author Francisco Acosta <francisco.acosta@inria.fr> | ||
* | ||
* @} | ||
*/ | ||
|
||
_boot_offset = DEFINED( _rom_offset ) ? _rom_offset : 0x0 ; | ||
|
||
MEMORY | ||
{ | ||
rom (rx) : ORIGIN = _rom_start_addr + _boot_offset, LENGTH = _rom_length - _boot_offset | ||
ram (rwx) : ORIGIN = _ram_start_addr, LENGTH = _ram_length | ||
} | ||
|
||
INCLUDE cortexm_base.ld |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here and below: comment needs updating
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so, BOSSA is the default flash tool (for these boards).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated it accordingly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I was looking at fixed version but the initial comment is still there ;)