Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 14 additions & 6 deletions examples/chapter04_04a/target/micros/avr/make/avr.ld
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright Christopher Kormanyos 2007 - 2023.
Copyright Christopher Kormanyos 2007 - 2025.
Distributed under the Boost Software License,
Version 1.0. (See accompanying file LICENSE_1_0.txt
or copy at http://www.boost.org/LICENSE_1_0.txt)
Expand All @@ -12,6 +12,10 @@ INPUT(libc.a libm.a libgcc.a)
OUTPUT_FORMAT("elf32-avr","elf32-avr","elf32-avr")
OUTPUT_ARCH(avr:5)

/* The beginning and end of the program ROM area. */
_rom_begin = 0x00000000;
_rom_end = 0x00007FFC;

/* The beginning and end (i.e., top) of the stack */
/* Set up a stack with a size of 0x180=(3/8)K */
_stack_begin = 0x00800780;
Expand All @@ -22,9 +26,8 @@ __initial_stack_pointer = 0x00800900 - 2;

MEMORY
{
VEC(rx) : ORIGIN = 0x00000000, LENGTH = 0x00000080
ROM(rx) : ORIGIN = 0x00000080, LENGTH = 32K - 0x00000080
RAM(rwx) : ORIGIN = 0x00800100, LENGTH = 0x00000780 - 0x00000100
ROM(rx) : ORIGIN = 0, LENGTH = 32K - 4
RAM(rw!x) : ORIGIN = 0x00800100, LENGTH = 0x00000780 - 0x00000100
}

SECTIONS
Expand All @@ -38,7 +41,7 @@ SECTIONS
*(.isr_vector)
. = ALIGN(0x10);
KEEP(*(.isr_vector))
} > VEC = 0x5555
} > ROM = 0xAAAA

/* Startup code */
.startup :
Expand Down Expand Up @@ -67,6 +70,11 @@ SECTIONS
. = ALIGN(2);
} > ROM

.text :
{
. = ALIGN(0x10);
} > ROM = 0xAAAA

. = 0x00800100;
. = ALIGN(2);

Expand All @@ -80,7 +88,7 @@ SECTIONS
*(.data*)
. = ALIGN(2);
KEEP (*(.data*))
*(.rodata) /* Use special handling of rodata (i.e., as part of data since _const_ variables are stored in RAM for AVR arch). */
*(.rodata) /* Do *NOT* move this! Include .rodata here if gcc is used with -fdata-sections. */
. = ALIGN(2);
KEEP (*(.rodata))
*(.rodata*)
Expand Down
3 changes: 2 additions & 1 deletion examples/chapter04_04a/target/micros/avr/make/avr_flags.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
ifneq ($(MAKE),make)
GCC_VERSION = 15.1.0
endif

GCC_TARGET = avr
GCC_PREFIX = avr

Expand All @@ -33,7 +34,7 @@ endif
TGT_CFLAGS = -std=c11 \
$(TGT_ALLFLAGS)

TGT_CXXFLAGS = -std=c++14 \
TGT_CXXFLAGS = -std=c++20 \
$(TGT_ALLFLAGS)

TGT_INCLUDES = -I$(PATH_APP)/util/STL
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////////
// Copyright Christopher Kormanyos 2017 - 2018.
// Copyright Christopher Kormanyos 2017 - 2025.
// Distributed under the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt
// or copy at http://www.boost.org/LICENSE_1_0.txt)
Expand Down
2 changes: 1 addition & 1 deletion examples/chapter09_08/src/sys/start/sys_start.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////////
// Copyright Christopher Kormanyos 2007 - 2023.
// Copyright Christopher Kormanyos 2007 - 2025.
// Distributed under the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt
// or copy at http://www.boost.org/LICENSE_1_0.txt)
Expand Down
Loading