Skip to content

Commit 9a618e8

Browse files
author
donRaphaco
authored
support for esp32 (#12)
* esp32 extensions * start mainApp as new task * fix typo Signed-off-by: Raphael Vogelgsang <Raphael.Vogelgsang@de.bosch.com> * config uart pins with menuconfig Signed-off-by: Raphael Vogelgsang <Raphael.Vogelgsang@de.bosch.com>
1 parent cda4dbd commit 9a618e8

16 files changed

Lines changed: 960 additions & 2 deletions

File tree

apps/int32_publisher/app.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include <stdio.h>
2+
#include <unistd.h>
23

34
#include <rcl/rcl.h>
45
#include <rcl/error_handling.h>
@@ -7,6 +8,11 @@
78
#include <rclc/rclc.h>
89
#include <rclc/executor.h>
910

11+
#ifdef ESP_PLATFORM
12+
#include "freertos/FreeRTOS.h"
13+
#include "freertos/task.h"
14+
#endif
15+
1016
#define RCCHECK(fn) { rcl_ret_t temp_rc = fn; if((temp_rc != RCL_RET_OK)){printf("Failed status on line %d: %d. Aborting.\n",__LINE__,(int)temp_rc);vTaskDelete(NULL);}}
1117
#define RCSOFTCHECK(fn) { rcl_ret_t temp_rc = fn; if((temp_rc != RCL_RET_OK)){printf("Failed status on line %d: %d. Continuing.\n",__LINE__,(int)temp_rc);}}
1218

@@ -70,4 +76,4 @@ void appMain(void * arg)
7076
RCCHECK(rcl_node_fini(&node))
7177

7278
vTaskDelete(NULL);
73-
}
79+
}

apps/ping_pong/app-colcon.meta

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@
1111
]
1212
}
1313
}
14-
}
14+
}

apps/ping_pong/app.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@
99
#include <unistd.h>
1010
#include <time.h>
1111

12+
#ifdef ESP_PLATFORM
13+
#include "freertos/FreeRTOS.h"
14+
#include "freertos/task.h"
15+
#endif
16+
1217
#define STRING_BUFFER_LEN 50
1318

1419
#define RCCHECK(fn) { rcl_ret_t temp_rc = fn; if((temp_rc != RCL_RET_OK)){printf("Failed status on line %d: %d. Aborting.\n",__LINE__,(int)temp_rc); vTaskDelete(NULL);}}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
build/
2+
sdkconfig
3+
sdkconfig.old
4+
esp32_toolchain.cmake
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
cmake_minimum_required(VERSION 3.5)
2+
3+
if(NOT DEFINED IDF_PATH)
4+
message(FATAL_ERROR "The CMake varible IDF_PATH was not set!")
5+
endif()
6+
7+
if(NOT DEFINED UROS_APP)
8+
message(FATAL_ERROR "The CMake varible UROS_APP was not set!")
9+
endif()
10+
11+
include(${IDF_PATH}/tools/cmake/project.cmake)
12+
project(${UROS_APP})
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
file(GLOB SRCS ${CMAKE_CURRENT_LIST_DIR}/*.c*)
2+
idf_component_register(SRCS ${SRCS}
3+
INCLUDE_DIRS ".")

0 commit comments

Comments
 (0)