forked from simonjwright/FreeRTOS-Ada
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
1,324 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# For more information about build system see | ||
# https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/build-system.html | ||
# The following five lines of boilerplate have to be in your project's | ||
# CMakeLists in this exact order for cmake to work correctly | ||
cmake_minimum_required(VERSION 3.5) | ||
|
||
set(EXTRA_COMPONENT_DIRS "/home/max/net/esp32-gnat-rts/") | ||
|
||
include($ENV{IDF_PATH}/tools/cmake/project.cmake) | ||
project(hello_world) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
idf_component_register(SRCS "hello_world.c" | ||
INCLUDE_DIRS "." | ||
REQUIRES esp32-gnat-rts) | ||
|
||
# Build *.gpr into a static library | ||
add_custom_command(OUTPUT ${BUILD_DIR}/libadamain.a | ||
COMMAND gprbuild -b -c -p -P ${COMPONENT_DIR}/hello_world.gpr | ||
--db ${COMPONENT_DIR}/gprconfig | ||
--autoconf=${BUILD_DIR}/config.cgpr | ||
--RTS=${BUILD_DIR}/rts | ||
&& xtensa-esp32-elf-ar rcs ${BUILD_DIR}/libadamain.a | ||
${COMPONENT_DIR}/.objs/b__hello_world.o | ||
${COMPONENT_DIR}/.objs/hello_world.o | ||
DEPENDS hello_world.gpr hello_world.adb | ||
VERBATIM) | ||
|
||
add_custom_target(adamain DEPENDS ${BUILD_DIR}/libadamain.a) | ||
add_dependencies(${COMPONENT_LIB} adamain) | ||
target_link_libraries(${COMPONENT_LIB} ${BUILD_DIR}/libadamain.a) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
with System; | ||
|
||
procedure Hello_World is | ||
|
||
procedure puts | ||
(data : System.Address) | ||
with Import, Convention => C, External_Name => "puts"; | ||
|
||
Hello : String := "Hello from Ada!" & ASCII.NUL; | ||
begin | ||
puts (Hello'Address); | ||
end; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
extern void main(); | ||
|
||
void app_main(void) | ||
{ | ||
main(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
project Hello_World is | ||
for Target use "xtensa-esp32-elf"; | ||
for Main use ("hello_world.adb"); | ||
for Object_Dir use ".objs"; | ||
end Hello_World; |
Oops, something went wrong.