Skip to content

Commit 08b44d2

Browse files
authored
Update toolchains (#1)
* Update toolchains * Update CI * Update CI * Updated CI * Update CI * Update Ci
1 parent e212208 commit 08b44d2

File tree

6 files changed

+19
-25
lines changed

6 files changed

+19
-25
lines changed

.github/workflows/ci.yml

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,31 +7,34 @@ on:
77

88
jobs:
99

10-
rmw_microxrcedds_ci:
10+
micro_ros_arduino:
1111
runs-on: ubuntu-20.04
1212
container: ubuntu:20.04
1313

1414
steps:
1515
- uses: actions/checkout@v2
1616
with:
17-
path: src/rmw-microxrcedds
17+
path: checkout/
1818

19-
- name: Download dependencies
19+
- name: Build OpenCR
2020
run: |
2121
apt update
22-
apt install git curl
22+
apt install -y git curl lib32z1 wget
2323
curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | sh
24-
mkdir -p /root/Arduino/libraries/micro_ros_arduino-0.0.1/
25-
26-
- uses: actions/checkout@v2
27-
with:
28-
path: /root/Arduino/libraries/micro_ros_arduino-0.0.1/
29-
30-
- name: Build sample OpenCR
31-
run: |
24+
mkdir -p /github/home/Arduino/libraries/micro_ros_arduino-0.0.1/
25+
cp -R checkout/* /github/home/Arduino/libraries/micro_ros_arduino-0.0.1/
3226
echo '''board_manager:
3327
additional_urls:
3428
- https://raw.githubusercontent.com/ROBOTIS-GIT/OpenCR/master/arduino/opencr_release/package_opencr_index.json''' > arduino-cli.yaml
29+
export PATH=$PATH:/github/workspace/bin:/__w/micro_ros_arduino/micro_ros_arduino/bin
30+
arduino-cli core install OpenCR:OpenCR -v
3531
arduino-cli core update-index
36-
arduino-cli core install OpenCR:OpenCR
37-
arduino-cli compile --fqbn OpenCR:OpenCR:OpenCR /root/Arduino/libraries/micro_ros_arduino-0.0.1/examples/micro-ros_publisher -v
32+
arduino-cli lib update-index
33+
# Remove when https://github.com/ROBOTIS-GIT/OpenCR/pull/253 merged
34+
export ORIGIN=$(pwd)
35+
cd /github/home/.arduino15/packages/OpenCR/hardware/OpenCR/1.4.15
36+
rm -rf platform.txt
37+
wget https://raw.githubusercontent.com/ROBOTIS-GIT/OpenCR/44bcd82f48a933a7db5fae1bd69e97cda4932832/arduino/opencr_arduino/opencr/platform.txt
38+
cd $ORIGIN
39+
# Remove until here
40+
arduino-cli compile --fqbn OpenCR:OpenCR:OpenCR /github/home/Arduino/libraries/micro_ros_arduino-0.0.1/examples/micro-ros_publisher -v

extras/library_generation/teensy32_toolchain.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ set(CMAKE_CXX_COMPILER $ENV{TOOLCHAIN_PREFIX}g++)
88
SET(CMAKE_C_COMPILER_WORKS 1 CACHE INTERNAL "")
99
SET(CMAKE_CXX_COMPILER_WORKS 1 CACHE INTERNAL "")
1010

11-
set(FLAGS "-O2 -fsingle-precision-constant -mcpu=cortex-m4 -nostdlib -mthumb" CACHE STRING "" FORCE)
11+
set(FLAGS "-O2 -fsingle-precision-constant -ffunction-sections -fdata-sections -fno-exceptions -mcpu=cortex-m4 -nostdlib -mthumb" CACHE STRING "" FORCE)
1212

1313
set(CMAKE_C_FLAGS_INIT "-std=c11 ${FLAGS} -DCLOCK_MONOTONIC=0 -D'__attribute__(x)='" CACHE STRING "" FORCE)
1414
set(CMAKE_CXX_FLAGS_INIT "-std=c++14 ${FLAGS} -fno-rtti -DCLOCK_MONOTONIC=0 -D'__attribute__(x)='" CACHE STRING "" FORCE)

extras/library_generation/teensy4_toolchain.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ set(CMAKE_CXX_COMPILER $ENV{TOOLCHAIN_PREFIX}g++)
88
SET(CMAKE_C_COMPILER_WORKS 1 CACHE INTERNAL "")
99
SET(CMAKE_CXX_COMPILER_WORKS 1 CACHE INTERNAL "")
1010

11-
set(FLAGS "-O2 -mfloat-abi=hard -mfpu=fpv5-d16 -ffunction-sections -fdata-sections -nostdlib -mcpu=cortex-m7 -mthumb" CACHE STRING "" FORCE)
11+
set(FLAGS "-O2 -mfloat-abi=hard -mfpu=fpv5-d16 -ffunction-sections -fdata-sections -fno-exceptions -nostdlib -mcpu=cortex-m7 -mthumb" CACHE STRING "" FORCE)
1212

1313
set(CMAKE_C_FLAGS_INIT "-std=c11 ${FLAGS} -DCLOCK_MONOTONIC=0 -D'__attribute__(x)='" CACHE STRING "" FORCE)
1414
set(CMAKE_CXX_FLAGS_INIT "-std=c++14 ${FLAGS} -fno-rtti -DCLOCK_MONOTONIC=0 -D'__attribute__(x)='" CACHE STRING "" FORCE)

src/arduino_transports.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,6 @@
1313
// TODO: This should be fixed
1414
#if defined(ARDUINO_TEENSY32)
1515

16-
void usleep(uint32_t usec){
17-
delay(usec/1000);
18-
}
19-
20-
// Fake functions
21-
int mkdir(const char * abs_path, uint32_t mode){
22-
return 0;
23-
}
24-
2516
void _write(){
2617
}
2718

-121 KB
Binary file not shown.

src/mk20dx256/libmicroros.a

845 KB
Binary file not shown.

0 commit comments

Comments
 (0)