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_riscv_cop/mcal_led.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@
//

#include <mcal_led.h>
#include <mcal_led/mcal_led_dummy.h>
#include <mcal_led/mcal_led_port.h>

mcal::led::led_base& mcal::led::led0()
{
using led0_led_type = mcal::led::led_dummy;
using led0_port_type = mcal::port::port_pin<UINT32_C(17)>;

using led0_led_type = mcal::led::led_port<led0_port_type>;

static led0_led_type the_led_00;

Expand Down
4 changes: 3 additions & 1 deletion ref_app/src/mcal/xtensa_esp32_s3_riscv_cop/mcal_port.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

#include <mcal_port.h>

void mcal::port::init(const config_type*)
auto mcal::port::init(const config_type*) -> void
{
// Set all GPIO out registers to low.
mcal::reg::reg_access_static<std::uint32_t, std::uint32_t, mcal::reg::gpio::rtc_gpio_out_reg, UINT32_C(0)>::reg_set();
}
4 changes: 2 additions & 2 deletions ref_app/src/mcal/xtensa_esp32_s3_riscv_cop/mcal_port.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
{
namespace port
{
typedef void config_type;
using config_type = void;

inline auto init(const config_type*) -> void { }
auto init(const config_type*) -> void;

template<const std::uint32_t bpos>
class port_pin
Expand Down
4 changes: 3 additions & 1 deletion ref_app/target.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1149,7 +1149,9 @@
<ClCompile Include="target\micros\xtensa_esp32_s3\startup\crt1.cpp" />
<ClCompile Include="target\micros\xtensa_esp32_s3\startup\Std\StdLib.cpp" />
<ClCompile Include="target\micros\xtensa_esp32_s3_riscv_cop\startup\from_no_sdk\Code\Appli\main.cpp" />
<ClCompile Include="target\micros\xtensa_esp32_s3_riscv_cop\startup\from_no_sdk\Code\Startup\Startup.c" />
<ClCompile Include="target\micros\xtensa_esp32_s3_riscv_cop\startup\from_no_sdk\Code\Startup\crt0.cpp" />
<ClCompile Include="target\micros\xtensa_esp32_s3_riscv_cop\startup\from_no_sdk\Code\Startup\crt0_init_ram.cpp" />
<ClCompile Include="target\micros\xtensa_esp32_s3_riscv_cop\startup\from_no_sdk\Code\Startup\crt1.cpp" />
</ItemGroup>
<ItemGroup>
<Text Include="target\micros\bcm2835_raspi_b\startup\SD_CARD\PiZero\config.txt" />
Expand Down
12 changes: 9 additions & 3 deletions ref_app/target.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -1004,12 +1004,18 @@
<ClCompile Include="target\micros\xtensa_esp32_s3\startup\Std\StdLib.cpp">
<Filter>micros\xtensa_esp32_s3\startup\Std</Filter>
</ClCompile>
<ClCompile Include="target\micros\xtensa_esp32_s3_riscv_cop\startup\from_no_sdk\Code\Startup\Startup.c">
<Filter>micros\xtensa_esp32_s3_riscv_cop\startup\from_no_sdk\Code\Startup</Filter>
</ClCompile>
<ClCompile Include="target\micros\xtensa_esp32_s3_riscv_cop\startup\from_no_sdk\Code\Appli\main.cpp">
<Filter>micros\xtensa_esp32_s3_riscv_cop\startup\from_no_sdk\Code\Appli</Filter>
</ClCompile>
<ClCompile Include="target\micros\xtensa_esp32_s3_riscv_cop\startup\from_no_sdk\Code\Startup\crt1.cpp">
<Filter>micros\xtensa_esp32_s3_riscv_cop\startup\from_no_sdk\Code\Startup</Filter>
</ClCompile>
<ClCompile Include="target\micros\xtensa_esp32_s3_riscv_cop\startup\from_no_sdk\Code\Startup\crt0.cpp">
<Filter>micros\xtensa_esp32_s3_riscv_cop\startup\from_no_sdk\Code\Startup</Filter>
</ClCompile>
<ClCompile Include="target\micros\xtensa_esp32_s3_riscv_cop\startup\from_no_sdk\Code\Startup\crt0_init_ram.cpp">
<Filter>micros\xtensa_esp32_s3_riscv_cop\startup\from_no_sdk\Code\Startup</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<Text Include="target\micros\bcm2835_raspi_b\startup\SD_CARD\PiZero\config.txt">
Expand Down
93 changes: 46 additions & 47 deletions ref_app/target/micros/xtensa_esp32_s3/startup/coprocessor_binary.S
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,50 @@
.global coprocessor_bin
coprocessor_bin:
.byte 0x6F, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x17, 0x11, 0x00, 0x00, 0x13, 0x01, 0x01, 0x42, 0x6F, 0x00, 0x40, 0x04, 0xA9, 0x66, 0xA9, 0x67
.byte 0x23, 0xA0, 0x06, 0x40, 0x03, 0xA6, 0x87, 0x4C, 0xB7, 0x05, 0x08, 0x00, 0x93, 0x86, 0x06, 0x40
.byte 0x4D, 0x8E, 0x23, 0xA4, 0xC7, 0x4C, 0x23, 0xA6, 0x07, 0x46, 0x03, 0xA7, 0xC7, 0x40, 0x37, 0x06
.byte 0x00, 0x08, 0x51, 0x8F, 0x23, 0xA6, 0xE7, 0x40, 0x98, 0x42, 0xB7, 0x07, 0x0C, 0x00, 0x31, 0x8F
.byte 0x98, 0xC2, 0x01, 0x00, 0xFD, 0x17, 0xF5, 0xFF, 0xC5, 0xBF, 0x00, 0x00, 0xB7, 0x16, 0x00, 0x50
.byte 0x83, 0xA7, 0x86, 0x00, 0x41, 0x11, 0x06, 0xC6, 0x22, 0xC4, 0x26, 0xC2, 0x7D, 0x56, 0x93, 0x86
.byte 0x86, 0x00, 0x63, 0x83, 0xC7, 0x02, 0xD8, 0x42, 0x63, 0x00, 0xC7, 0x02, 0x81, 0x47, 0x09, 0xCB
.byte 0x98, 0x42, 0x3E, 0x97, 0x23, 0x00, 0x07, 0x00, 0xD8, 0x42, 0x85, 0x07, 0xE3, 0xEA, 0xE7, 0xFE
.byte 0x9C, 0x46, 0xA1, 0x06, 0xE3, 0x91, 0xC7, 0xFE, 0x37, 0x17, 0x00, 0x50, 0x83, 0x27, 0x87, 0x01
.byte 0xFD, 0x55, 0x13, 0x07, 0x87, 0x01, 0x05, 0x45, 0x63, 0x86, 0xB7, 0x04, 0x54, 0x43, 0x63, 0x83
.byte 0xB6, 0x04, 0x1C, 0x47, 0x63, 0x80, 0xB7, 0x04, 0x95, 0xCB, 0x1C, 0x43, 0x83, 0xC7, 0x07, 0x00
.byte 0x93, 0xF7, 0xF7, 0x0F, 0x23, 0x80, 0xF6, 0x00, 0x1C, 0x47, 0x63, 0x71, 0xF5, 0x02, 0x85, 0x47
.byte 0x10, 0x43, 0x54, 0x43, 0x3E, 0x96, 0x03, 0x46, 0x06, 0x00, 0xBE, 0x96, 0x85, 0x07, 0x13, 0x76
.byte 0xF6, 0x0F, 0x23, 0x80, 0xC6, 0x00, 0x14, 0x47, 0xE3, 0xE4, 0xD7, 0xFE, 0x5C, 0x47, 0x31, 0x07
.byte 0xE3, 0x9E, 0xB7, 0xFA, 0xB7, 0x17, 0x00, 0x50, 0x83, 0xA7, 0x07, 0x00, 0x37, 0x14, 0x00, 0x50
.byte 0xFD, 0x54, 0x13, 0x04, 0x44, 0x00, 0x63, 0x87, 0x97, 0x00, 0x82, 0x97, 0x1C, 0x40, 0x11, 0x04
.byte 0xE3, 0x9D, 0x97, 0xFE, 0x21, 0x37, 0x01, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x17, 0x11, 0x00, 0x00, 0x13, 0x01, 0xC1, 0x43, 0x6F, 0x00, 0x80, 0x20, 0x41, 0x11, 0x06, 0xC6
.byte 0x21, 0x22, 0xB2, 0x40, 0x41, 0x01, 0x82, 0x80, 0xB7, 0x16, 0x00, 0x50, 0x03, 0xA7, 0x86, 0x01
.byte 0xB7, 0x17, 0x00, 0x50, 0x93, 0x87, 0x07, 0x03, 0x3A, 0x95, 0x63, 0x74, 0xF5, 0x00, 0x23, 0xAC
.byte 0xA6, 0x00, 0x3A, 0x85, 0x82, 0x80, 0x00, 0x00, 0x82, 0x80, 0x00, 0x00, 0x82, 0x80, 0x00, 0x00
.byte 0x01, 0x00, 0xFD, 0xBF, 0x00, 0x00, 0x00, 0x00, 0x01, 0x45, 0x82, 0x80, 0x00, 0x00, 0x00, 0x00
.byte 0x01, 0x45, 0x82, 0x80, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xFD, 0xBF, 0x00, 0x00, 0x00, 0x00
.byte 0x01, 0x00, 0xFD, 0xBF, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xFD, 0xBF, 0x00, 0x00, 0x00, 0x00
.byte 0x01, 0x00, 0xFD, 0xBF, 0x00, 0x00, 0x00, 0x00, 0x05, 0x45, 0x82, 0x80, 0x00, 0x00, 0x00, 0x00
.byte 0x01, 0x45, 0x82, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7D, 0x55, 0x82, 0x80, 0x00, 0x00, 0x00, 0x00
.byte 0x7D, 0x55, 0x82, 0x80, 0x00, 0x00, 0x00, 0x00, 0x01, 0x45, 0x82, 0x80, 0x00, 0x00, 0x00, 0x00
.byte 0x01, 0x45, 0x82, 0x80, 0x00, 0x00, 0x00, 0x00, 0x01, 0x45, 0x82, 0x80, 0x00, 0x00, 0x00, 0x00
.byte 0x01, 0x45, 0x82, 0x80, 0x00, 0x00, 0x00, 0x00, 0x05, 0x45, 0x82, 0x80, 0x00, 0x00, 0x00, 0x00
.byte 0x7D, 0x55, 0x82, 0x80, 0x00, 0x00, 0x00, 0x00, 0x82, 0x80, 0x00, 0x00, 0x01, 0x45, 0x82, 0x80
.byte 0x00, 0x00, 0x00, 0x00, 0x01, 0x45, 0x82, 0x80, 0x00, 0x00, 0x00, 0x00, 0x82, 0x80, 0x00, 0x00
.byte 0x01, 0x11, 0x2E, 0xC2, 0x32, 0xC4, 0x36, 0xC6, 0x3A, 0xC8, 0x3E, 0xCA, 0x42, 0xCC, 0x46, 0xCE
.byte 0x01, 0xA0, 0x00, 0x00, 0x37, 0x15, 0x00, 0x50, 0x13, 0x05, 0x05, 0x03, 0x82, 0x80, 0x00, 0x00
.byte 0x41, 0x11, 0x06, 0xC6, 0xC5, 0x3F, 0x83, 0x47, 0x05, 0x00, 0x81, 0xE7, 0x85, 0x47, 0x23, 0x00
.byte 0xF5, 0x00, 0xB2, 0x40, 0x41, 0x01, 0x82, 0x80, 0x01, 0x45, 0x81, 0x45, 0x82, 0x80, 0x00, 0x00
.byte 0x03, 0x45, 0x45, 0x00, 0x82, 0x80, 0x00, 0x00, 0x82, 0x80, 0x00, 0x00, 0x82, 0x80, 0x00, 0x00
.byte 0xA9, 0x67, 0x83, 0xA6, 0x07, 0x40, 0x03, 0x47, 0x45, 0x00, 0x37, 0x06, 0x00, 0x08, 0xB1, 0x8E
.byte 0x23, 0xA0, 0xD7, 0x40, 0x93, 0x47, 0x17, 0x00, 0x23, 0x02, 0xF5, 0x00, 0x82, 0x80, 0x00, 0x00
.byte 0xA1, 0x45, 0xED, 0xB5, 0xB7, 0x17, 0x00, 0x50, 0x03, 0xC7, 0x87, 0x03, 0x41, 0x11, 0x22, 0xC4
.byte 0x06, 0xC6, 0x37, 0x14, 0x00, 0x50, 0x19, 0xC7, 0xB2, 0x40, 0x13, 0x05, 0x04, 0x04, 0x22, 0x44
.byte 0x41, 0x01, 0x82, 0x80, 0xA9, 0x66, 0x03, 0xA6, 0x06, 0x40, 0x37, 0x17, 0x00, 0x50, 0x93, 0x05
.byte 0x04, 0x04, 0x37, 0x08, 0x00, 0x08, 0x13, 0x07, 0x87, 0x00, 0x98, 0xC1, 0x33, 0x66, 0x06, 0x01
.byte 0x23, 0xA0, 0xC6, 0x40, 0x03, 0xA6, 0x86, 0x4C, 0x37, 0x05, 0x08, 0x00, 0x36, 0x87, 0x49, 0x8E
.byte 0x23, 0xA4, 0xC6, 0x4C, 0x23, 0xA6, 0x06, 0x46, 0x83, 0xA6, 0xC6, 0x40, 0x37, 0x05, 0x00, 0x50
.byte 0x13, 0x05, 0xC5, 0x13, 0xB3, 0xE6, 0x06, 0x01, 0x23, 0x26, 0xD7, 0x40, 0x05, 0x47, 0x23, 0x82
.byte 0x05, 0x00, 0x23, 0x8C, 0xE7, 0x02, 0x49, 0x35, 0xB2, 0x40, 0x13, 0x05, 0x04, 0x04, 0x22, 0x44
.byte 0x41, 0x01, 0x82, 0x80, 0xA9, 0x67, 0x23, 0xA0, 0x07, 0x40, 0x82, 0x80, 0x00, 0x00, 0x00, 0x00
.byte 0x41, 0x11, 0x01, 0x45, 0x06, 0xC6, 0x22, 0xC4, 0xF5, 0x37, 0x01, 0x45, 0x11, 0x3F, 0x37, 0x14
.byte 0x00, 0x50, 0x8D, 0x37, 0x1C, 0x41, 0x9C, 0x47, 0x82, 0x97, 0x37, 0x07, 0x06, 0x00, 0x83, 0x27
.byte 0x84, 0x04, 0x7D, 0x17, 0x85, 0x07, 0x23, 0x24, 0xF4, 0x04, 0x75, 0xFB, 0xDD, 0xB7, 0x00, 0x00
.byte 0x41, 0x11, 0x06, 0xC6, 0x31, 0x20, 0xAD, 0x20, 0xE1, 0x37, 0x01, 0x00, 0x01, 0x00, 0xF5, 0xBF
.byte 0xB7, 0x16, 0x00, 0x50, 0x37, 0x17, 0x00, 0x50, 0x93, 0x86, 0xC6, 0x01, 0x93, 0x05, 0x87, 0x01
.byte 0xB7, 0x17, 0x00, 0x50, 0x33, 0x85, 0xB6, 0x40, 0x13, 0x86, 0x87, 0x01, 0x2A, 0x96, 0x63, 0x8D
.byte 0xB6, 0x00, 0x13, 0x07, 0x87, 0x01, 0x93, 0x87, 0x87, 0x01, 0x94, 0x43, 0x91, 0x07, 0x11, 0x07
.byte 0x23, 0x2E, 0xD7, 0xFE, 0xE3, 0x1B, 0xF6, 0xFE, 0xB7, 0x17, 0x00, 0x50, 0x37, 0x17, 0x00, 0x50
.byte 0x93, 0x86, 0x07, 0x02, 0x13, 0x07, 0xC7, 0x04, 0x63, 0x89, 0xE6, 0x00, 0x93, 0x87, 0x07, 0x02
.byte 0x23, 0xA0, 0x07, 0x00, 0x91, 0x07, 0xE3, 0x9D, 0xE7, 0xFE, 0x82, 0x80, 0x00, 0x00, 0x00, 0x00
.byte 0x41, 0x11, 0x22, 0xC4, 0x26, 0xC2, 0x37, 0x14, 0x00, 0x50, 0xB7, 0x14, 0x00, 0x50, 0x06, 0xC6
.byte 0x93, 0x07, 0x84, 0x01, 0x93, 0x84, 0x84, 0x01, 0x63, 0x8A, 0x97, 0x00, 0x13, 0x04, 0x84, 0x01
.byte 0x83, 0x27, 0xC4, 0xFF, 0x71, 0x14, 0x82, 0x97, 0xE3, 0x1C, 0x94, 0xFE, 0xB2, 0x40, 0x22, 0x44
.byte 0x92, 0x44, 0x41, 0x01, 0x82, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
Expand Down Expand Up @@ -230,33 +257,5 @@ coprocessor_bin:
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x30, 0x10, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00
.byte 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x30, 0x10, 0x00, 0x50, 0x30, 0x10, 0x00, 0x50
.byte 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x01, 0x00, 0x50, 0x60, 0x01, 0x00, 0x50
.byte 0x40, 0x01, 0x00, 0x50, 0x30, 0x01, 0x00, 0x50, 0x28, 0x10, 0x00, 0x50
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/*
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 : coprocessor.ld

Expand All @@ -15,9 +23,6 @@

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

/******************************************************************************************
ELF Entrypoint
******************************************************************************************/
ENTRY(_start)

/******************************************************************************************
Expand Down Expand Up @@ -51,75 +56,50 @@ SECTIONS
/* Read-only data (.rodata) (note: esp32-s3 has not data access path on I_SRAM, rodata must be move to D_SRAM) */
.rodata : ALIGN(4)
{
PROVIDE(__RODATA_BASE_ADDRESS = .);
*(.rodata)
. = ALIGN(4);
*(.rodata*)
. = ALIGN(4);
PROVIDE(__INTVECT_BASE_ADDRESS = .);
*(.intvect_core*)
. = ALIGN(4);
} > D_SRAM

/* Section for constructors */
.ctors : ALIGN(4)
{
PROVIDE(__CPPCTOR_LIST__ = .);
_ctors_begin = .;
KEEP (*(SORT(.ctors.*)))
KEEP (*(.ctors))
KEEP (*(SORT(.init_array.*)))
KEEP (*(.init_array))
LONG(-1) ;
PROVIDE(__CPPCTOR_END__ = .);
_ctors_end = .;
. = ALIGN(4);
} > D_SRAM


/* Section for destructors */
.dtors : ALIGN(4)
{
PROVIDE(__CPPDTOR_LIST__ = .);
KEEP (*(SORT(.dtors.*)))
KEEP (*(.dtors))
KEEP (*(SORT(.fini_array.*)))
KEEP (*(.fini_array))
LONG(-1) ;
PROVIDE(__CPPDTOR_END__ = .);
. = ALIGN(4);
} > D_SRAM

/* Runtime clear table */
.clear_sec : ALIGN(4)
{
PROVIDE(__RUNTIME_CLEAR_TABLE = .) ;
LONG(0 + ADDR(.bss)); LONG(SIZEOF(.bss));
LONG(-1); LONG(-1);
. = ALIGN(4);
} > D_SRAM

/* Runtime copy table (note: note needed on esp32-s3 bootROM copied the data from flash to SRAM) */
#if 0
.copy_sec : ALIGN(4)
{
PROVIDE(__RUNTIME_COPY_TABLE = .) ;
LONG(LOADADDR(.data)); LONG(0 + ADDR(.data)); LONG(SIZEOF(.data));
LONG(-1); LONG(-1); LONG(-1);
. = ALIGN(4);
} > D_SRAM
#endif

/* The ROM-to-RAM initialized data section */
.data : ALIGN(4)
{
PROVIDE(__DATA_BASE_ADDRESS = .);
_data_begin = .;
*(.data)
*(.data*)
_data_end = .;
} > D_SRAM

/* The uninitialized (zero-cleared) bss section */
.bss : ALIGN(4)
{
PROVIDE(__BSS_BASE_ADDRESS = .);
_bss_begin = .;
*(.bss)
*(.bss*)
_bss_end = .;
} > D_SRAM

PROVIDE(end = .);
PROVIDE(_fini = .);

_rom_data_begin = LOADADDR(.data);

/* stack definition */
.stack :
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,13 @@

FILES_CPP :=

FILES_TGT := $(PATH_TGT)/startup/from_no_sdk/Code/Appli/main \
FILES_TGT := $(PATH_APP)/mcal/mcal_gcc_cxx_completion \
$(PATH_APP)/mcal/$(TGT)/mcal_gpt \
$(PATH_APP)/mcal/$(TGT)/mcal_led \
$(PATH_APP)/mcal/$(TGT)/mcal_port \
$(PATH_TGT)/startup/from_no_sdk/Code/Appli/main \
$(PATH_TGT)/startup/from_no_sdk/Code/Startup/boot \
$(PATH_TGT)/startup/from_no_sdk/Code/Startup/IntVectTable \
$(PATH_TGT)/startup/from_no_sdk/Code/Startup/Startup
$(PATH_TGT)/startup/from_no_sdk/Code/Startup/crt0 \
$(PATH_TGT)/startup/from_no_sdk/Code/Startup/crt0_init_ram \
$(PATH_TGT)/startup/from_no_sdk/Code/Startup/crt1
Original file line number Diff line number Diff line change
Expand Up @@ -23,31 +23,29 @@

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

#include <mcal_gpt.h>
#include <mcal_led.h>
#include <mcal_port.h>

#include <cstdint>

extern "C"
void main();

extern "C"
void main()
namespace
{
// Set all GPIO out registers to low.
mcal::reg::reg_access_static<std::uint32_t, std::uint32_t, mcal::reg::gpio::rtc_gpio_out_reg, UINT32_C(0)>::reg_set();
volatile std::uint32_t main_counter { };
}

// Configure GPIO17 as output low.
using port_pin_type = mcal::port::port_pin<UINT32_C(17)>;
extern "C" void main();

port_pin_type::set_direction_output();
extern "C" void main()
{
mcal::port::init(nullptr);
mcal::gpt::init(nullptr);

for(;;)
{
port_pin_type::toggle_pin();
mcal::led::led0().toggle();

for(uint32_t i=0; i< 0xC0000; i++)
for(std::uint32_t loop { UINT32_C(0) }; loop < std::uint32_t { UINT32_C(0x00060000) }; ++loop)
{
asm volatile("nop");
main_counter = std::uint32_t { main_counter + UINT8_C(1) };
}
}
}
Loading