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
6 changes: 4 additions & 2 deletions ref_app/src/mcal/xtensa_esp32_s3/mcal_cpu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ extern "C"
}

extern "C"
void Mcu_StartCore1()
auto Mcu_StartCore1() -> void
{
// Note: This subroutine is called from core0.

Expand Down Expand Up @@ -65,6 +65,8 @@ void Mcu_StartCore1()
// The send/receive transaction of the entry address is
// carried out via core0 deliberately writing the core1
// entry address in the SYSTEM_CORE_1_CONTROL_1_REG register.
// When this is achieved and done, core1 exits the trap
// and progresses forward.

{
// Set the core1 entry address.
Expand All @@ -82,7 +84,7 @@ void Mcu_StartCore1()
}

extern "C"
void main_c1()
auto main_c1() -> void
{
// Note: This subroutine executes in core1. It has been called
// by the core1 branch of the subroutine _start().
Expand Down
4 changes: 2 additions & 2 deletions ref_app/target.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1006,8 +1006,8 @@
<None Include="target\micros\xtensa_esp32_s3\make\xtensa_esp32_s3_files.gmk" />
<None Include="target\micros\xtensa_esp32_s3\make\xtensa_esp32_s3_flags.gmk" />
<None Include="target\micros\xtensa_esp32_s3\make\xtensa_esp32_s3_flags_extra.gmk" />
<None Include="target\micros\xtensa_esp32_s3\startup\boot.s" />
<None Include="target\micros\xtensa_esp32_s3\startup\IntVectTable.s" />
<None Include="target\micros\xtensa_esp32_s3\startup\boot.S" />
<None Include="target\micros\xtensa_esp32_s3\startup\IntVectTable.S" />
<None Include="target\micros\xtensa_esp32_s3\startup\Std\ieee754-sf.S" />
<None Include="target\micros\xtensa_esp32_s3\startup\Std\lib1funcs.S" />
</ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions ref_app/target.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -636,10 +636,10 @@
<None Include="target\micros\xtensa_esp32_s3\make\xtensa_esp32_s3_flags.gmk">
<Filter>micros\xtensa_esp32_s3\make</Filter>
</None>
<None Include="target\micros\xtensa_esp32_s3\startup\boot.s">
<None Include="target\micros\xtensa_esp32_s3\startup\boot.S">
<Filter>micros\xtensa_esp32_s3\startup</Filter>
</None>
<None Include="target\micros\xtensa_esp32_s3\startup\IntVectTable.s">
<None Include="target\micros\xtensa_esp32_s3\startup\IntVectTable.S">
<Filter>micros\xtensa_esp32_s3\startup</Filter>
</None>
<None Include="target\micros\xtensa_esp32_s3\startup\Std\ieee754-sf.S">
Expand Down
7 changes: 7 additions & 0 deletions ref_app/target/micros/v850es_fx2/make/v850es_fx2.ld
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/*
Copyright Christopher Kormanyos 2014 - 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)
*/

/* Linker script for NEC V850 FX2 upD70F3231 */

INPUT(libc.a libg.a libm.a libgcc.a)
Expand Down
27 changes: 16 additions & 11 deletions ref_app/target/micros/xtensa_esp32_s3/make/xtensa_esp32_s3.ld
Original file line number Diff line number Diff line change
@@ -1,23 +1,28 @@
/*
Copyright Christopher Kormanyos 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)
*/

/* Originally from: */
/******************************************************************************************
Filename : Memory_Map.ld

Core : Xtensa LX7

MCU : ESP32-S3

Author : Chalandi Amine

Owner : Chalandi Amine

Date : 16.02.2025

Description : Linker description file script for ESP32-S3

******************************************************************************************/

/******************************************************************************************
ELF Entrypoint
******************************************************************************************/

ENTRY(_start)

INPUT(libgcc_call0_abi.a libc_call0_abi.a libg_call0_abi.a libm_call0_abi.a)
Expand Down Expand Up @@ -70,7 +75,7 @@ SECTIONS
. = ALIGN(4);
} > D_SRAM

/* Section for constructors */
/* Section for constructors */
.ctors : ALIGN(4)
{
_ctors_begin = .;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ TGT_ALLFLAGS = -O1
-fno-stack-protector \
-nostdlib \
-gdwarf-4 \
-DCONFIG_IDF_TARGET_ESP32S3
-DCONFIG_IDF_TARGET_ESP32S3 \
-DI_KNOW_WHAT_I_AM_DOING


TGT_CFLAGS = -std=c23 \
Expand All @@ -67,7 +68,6 @@ TGT_LDFLAGS = -nostartfiles
-Wl,--gc-sections \
-Wl,-Map,$(APP).map \
-T $(LINKER_DEFINITION_FILE) \
-z,max-page-size=4096 \
--specs=nano.specs \
--specs=nosys.specs

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
******************************************************************************************/

/******************************************************************************************
Filename : IntVectTable.s
Filename : IntVectTable.S

Core : Xtensa LX7

Expand Down
45 changes: 0 additions & 45 deletions ref_app/target/micros/xtensa_esp32_s3/startup/Std/StdLib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,49 +209,4 @@ void* memcpy (void* dest, const void* src, size_t n)
return dest;
}

void* memmove (void* dest, const void* src, size_t n)
{
uint8_t* from = (uint8_t*) src;
uint8_t* to = (uint8_t*) dest;

if(from == to || n == 0)
{
return dest;
}

if(to > from && (ptrdiff_t) (to - from) < (ptrdiff_t) n)
{
// to overlaps with from
// <from......>
// <to........>
// copy in reverse, to avoid overwriting from

for(ptrdiff_t i = (ptrdiff_t) (n - 1); i >= 0; --i)
{
to[i] = from[i];
}

return dest;
}

if(from > to && (ptrdiff_t) (from - to) < (ptrdiff_t) n)
{
// to overlaps with from
// <from......>
// <to........>
// copy forwards, to avoid overwriting from

for(size_t i = 0U; i < n; ++i)
{
to[i] = from[i];
}

return dest;
}

memcpy(dest, src, n);

return dest;
}

} // extern "C"
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
******************************************************************************************/

/******************************************************************************************
Filename : boot.s
Filename : boot.S

Core : Xtensa LX7

Expand Down