Skip to content

Commit ae67311

Browse files
authored
Merge pull request #622 from ckormanyos/more_cleanup_esp32s3
More cleanup esp32s3
2 parents 3de307a + 68594a4 commit ae67311

9 files changed

Lines changed: 35 additions & 66 deletions

File tree

ref_app/src/mcal/xtensa_esp32_s3/mcal_cpu.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ extern "C"
2424
}
2525

2626
extern "C"
27-
void Mcu_StartCore1()
27+
auto Mcu_StartCore1() -> void
2828
{
2929
// Note: This subroutine is called from core0.
3030

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

6971
{
7072
// Set the core1 entry address.
@@ -82,7 +84,7 @@ void Mcu_StartCore1()
8284
}
8385

8486
extern "C"
85-
void main_c1()
87+
auto main_c1() -> void
8688
{
8789
// Note: This subroutine executes in core1. It has been called
8890
// by the core1 branch of the subroutine _start().

ref_app/target.vcxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1006,8 +1006,8 @@
10061006
<None Include="target\micros\xtensa_esp32_s3\make\xtensa_esp32_s3_files.gmk" />
10071007
<None Include="target\micros\xtensa_esp32_s3\make\xtensa_esp32_s3_flags.gmk" />
10081008
<None Include="target\micros\xtensa_esp32_s3\make\xtensa_esp32_s3_flags_extra.gmk" />
1009-
<None Include="target\micros\xtensa_esp32_s3\startup\boot.s" />
1010-
<None Include="target\micros\xtensa_esp32_s3\startup\IntVectTable.s" />
1009+
<None Include="target\micros\xtensa_esp32_s3\startup\boot.S" />
1010+
<None Include="target\micros\xtensa_esp32_s3\startup\IntVectTable.S" />
10111011
<None Include="target\micros\xtensa_esp32_s3\startup\Std\ieee754-sf.S" />
10121012
<None Include="target\micros\xtensa_esp32_s3\startup\Std\lib1funcs.S" />
10131013
</ItemGroup>

ref_app/target.vcxproj.filters

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -636,10 +636,10 @@
636636
<None Include="target\micros\xtensa_esp32_s3\make\xtensa_esp32_s3_flags.gmk">
637637
<Filter>micros\xtensa_esp32_s3\make</Filter>
638638
</None>
639-
<None Include="target\micros\xtensa_esp32_s3\startup\boot.s">
639+
<None Include="target\micros\xtensa_esp32_s3\startup\boot.S">
640640
<Filter>micros\xtensa_esp32_s3\startup</Filter>
641641
</None>
642-
<None Include="target\micros\xtensa_esp32_s3\startup\IntVectTable.s">
642+
<None Include="target\micros\xtensa_esp32_s3\startup\IntVectTable.S">
643643
<Filter>micros\xtensa_esp32_s3\startup</Filter>
644644
</None>
645645
<None Include="target\micros\xtensa_esp32_s3\startup\Std\ieee754-sf.S">

ref_app/target/micros/v850es_fx2/make/v850es_fx2.ld

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
/*
2+
Copyright Christopher Kormanyos 2014 - 2025.
3+
Distributed under the Boost Software License,
4+
Version 1.0. (See accompanying file LICENSE_1_0.txt
5+
or copy at http://www.boost.org/LICENSE_1_0.txt)
6+
*/
7+
18
/* Linker script for NEC V850 FX2 upD70F3231 */
29

310
INPUT(libc.a libg.a libm.a libgcc.a)

ref_app/target/micros/xtensa_esp32_s3/make/xtensa_esp32_s3.ld

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,28 @@
1+
/*
2+
Copyright Christopher Kormanyos 2025.
3+
Distributed under the Boost Software License,
4+
Version 1.0. (See accompanying file LICENSE_1_0.txt
5+
or copy at http://www.boost.org/LICENSE_1_0.txt)
6+
*/
7+
8+
/* Originally from: */
19
/******************************************************************************************
210
Filename : Memory_Map.ld
3-
11+
412
Core : Xtensa LX7
5-
13+
614
MCU : ESP32-S3
7-
15+
816
Author : Chalandi Amine
9-
17+
1018
Owner : Chalandi Amine
11-
19+
1220
Date : 16.02.2025
13-
21+
1422
Description : Linker description file script for ESP32-S3
15-
16-
******************************************************************************************/
1723
18-
/******************************************************************************************
19-
ELF Entrypoint
2024
******************************************************************************************/
25+
2126
ENTRY(_start)
2227

2328
INPUT(libgcc_call0_abi.a libc_call0_abi.a libg_call0_abi.a libm_call0_abi.a)
@@ -70,7 +75,7 @@ SECTIONS
7075
. = ALIGN(4);
7176
} > D_SRAM
7277

73-
/* Section for constructors */
78+
/* Section for constructors */
7479
.ctors : ALIGN(4)
7580
{
7681
_ctors_begin = .;

ref_app/target/micros/xtensa_esp32_s3/make/xtensa_esp32_s3_flags.gmk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ TGT_ALLFLAGS = -O1
4646
-fno-stack-protector \
4747
-nostdlib \
4848
-gdwarf-4 \
49-
-DCONFIG_IDF_TARGET_ESP32S3
49+
-DCONFIG_IDF_TARGET_ESP32S3 \
50+
-DI_KNOW_WHAT_I_AM_DOING
5051

5152

5253
TGT_CFLAGS = -std=c23 \
@@ -67,7 +68,6 @@ TGT_LDFLAGS = -nostartfiles
6768
-Wl,--gc-sections \
6869
-Wl,-Map,$(APP).map \
6970
-T $(LINKER_DEFINITION_FILE) \
70-
-z,max-page-size=4096 \
7171
--specs=nano.specs \
7272
--specs=nosys.specs
7373

ref_app/target/micros/xtensa_esp32_s3/startup/IntVectTable.s renamed to ref_app/target/micros/xtensa_esp32_s3/startup/IntVectTable.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
******************************************************************************************/
1010

1111
/******************************************************************************************
12-
Filename : IntVectTable.s
12+
Filename : IntVectTable.S
1313

1414
Core : Xtensa LX7
1515

ref_app/target/micros/xtensa_esp32_s3/startup/Std/StdLib.cpp

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -209,49 +209,4 @@ void* memcpy (void* dest, const void* src, size_t n)
209209
return dest;
210210
}
211211

212-
void* memmove (void* dest, const void* src, size_t n)
213-
{
214-
uint8_t* from = (uint8_t*) src;
215-
uint8_t* to = (uint8_t*) dest;
216-
217-
if(from == to || n == 0)
218-
{
219-
return dest;
220-
}
221-
222-
if(to > from && (ptrdiff_t) (to - from) < (ptrdiff_t) n)
223-
{
224-
// to overlaps with from
225-
// <from......>
226-
// <to........>
227-
// copy in reverse, to avoid overwriting from
228-
229-
for(ptrdiff_t i = (ptrdiff_t) (n - 1); i >= 0; --i)
230-
{
231-
to[i] = from[i];
232-
}
233-
234-
return dest;
235-
}
236-
237-
if(from > to && (ptrdiff_t) (from - to) < (ptrdiff_t) n)
238-
{
239-
// to overlaps with from
240-
// <from......>
241-
// <to........>
242-
// copy forwards, to avoid overwriting from
243-
244-
for(size_t i = 0U; i < n; ++i)
245-
{
246-
to[i] = from[i];
247-
}
248-
249-
return dest;
250-
}
251-
252-
memcpy(dest, src, n);
253-
254-
return dest;
255-
}
256-
257212
} // extern "C"

ref_app/target/micros/xtensa_esp32_s3/startup/boot.s renamed to ref_app/target/micros/xtensa_esp32_s3/startup/boot.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
******************************************************************************************/
1010

1111
/******************************************************************************************
12-
Filename : boot.s
12+
Filename : boot.S
1313
1414
Core : Xtensa LX7
1515

0 commit comments

Comments
 (0)