Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
14a5007
wip: cmake conversion
dhalbert Feb 23, 2025
d6cc985
wip: use esp32-arduino libraries a lot more
dhalbert Feb 27, 2025
a08e8cb
wip: restructure to use arduino-esp32 as a component
dhalbert Mar 4, 2025
1e8cfaa
wip: compiles; crashes early; debug printing now working
dhalbert Mar 5, 2025
1d83f41
wip: HTTP working
dhalbert Mar 6, 2025
0cd6ae6
wip: preparing for c6; use sdkconfig.defaults, don't check in sdkconfig
dhalbert Mar 7, 2025
0f3d2ef
remove managed_components
hathach Mar 11, 2025
e1fcb6c
use log_i() (default), log_d() is enabled when CMAKE_BUILD_TYPE=DEBU…
hathach Mar 11, 2025
6334516
update ci build
hathach Mar 11, 2025
85d1d6d
fix esp32c6 compile issue
hathach Mar 11, 2025
fa09a76
wifitest work wwith esp32c6
hathach Mar 12, 2025
309a3ae
try upload artifact with release/debug build
hathach Mar 12, 2025
74339a4
use default root cert bundle provided by ESP-IDF
dhalbert Mar 14, 2025
4d89dd3
fix combine.py to handle different bootloader offstes
dhalbert Mar 16, 2025
a854048
check WiFi.hostByName() return value properly
dhalbert Mar 16, 2025
1ad988a
more precise return value check on beginPacket()
dhalbert Mar 17, 2025
5a6b5b3
separate esp32 and c6 sdkconfig
hathach Mar 14, 2025
f7c4cde
BT works tested with esp32
hathach Mar 17, 2025
7f17ca5
- parameterize SPIs & UART pin setting
hathach Mar 18, 2025
8232491
update sketch.ino.cpp as closed as upstream
hathach Mar 18, 2025
07096cd
add target for combined binary e.g NINA-ADAFRUIT-esp32, upload combin…
hathach Mar 18, 2025
74f8e1f
fix GPIO0 (esp32) GPIO9 (s6) as wifi available pin due to typo. Make …
hathach Mar 19, 2025
662b31e
build need -DBOARD= instead of IDF_TARGET to allow flexible pinout fo…
hathach Jun 2, 2025
40b28ea
move sdkconfig and board.h to boards folder
hathach Jun 3, 2025
81c521d
use base mac for getMACaddr() if interface is not up
hathach Jun 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
47 changes: 26 additions & 21 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,50 +13,55 @@ concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

env:
IDF_VERSION: v5.3.2

jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
config:
- 'release'
- 'debug'
board:
- 'esp32'
- 'fruitjam_c6'
build_type:
- 'Release'
- 'Debug'
steps:
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.x'

- name: Pull ESP-IDF docker
run: docker pull espressif/idf:v3.3.1
run: docker pull espressif/idf:$IDF_VERSION

- name: Checkout
uses: actions/checkout@v4

- name: Checkout submodules
run: git submodule update --init --depth 1 certificates
run: git submodule update --init --depth 1 certificates components/arduino-esp32

- name: Build
if: matrix.config == 'release'
run: docker run --rm -v $PWD:/project -w /project espressif/idf:v3.3.1 make firmware

- name: Build for Debug
if: matrix.config == 'debug'
run: |
docker run --rm -v $PWD:/project -w /project espressif/idf:v3.3.1 make NINA_DEBUG=1 firmware
mv NINA_W102*.bin "$(echo NINA_W102*.bin | sed 's/.bin/_debug.bin/')"
docker run --rm -v $PWD:/project -w /project espressif/idf:$IDF_VERSION /bin/bash -c "git config --global --add safe.directory /project && idf.py -DBOARD=${{ matrix.board }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} build"
# combine.py is auto run as postbuild
if [ "${{ matrix.build_type }}" == "Debug" ]; then
# add debug suffix to the bin file
mv NINA_ADAFRUIT*.bin "$(echo NINA_ADAFRUIT*.bin | sed 's/.bin/_Debug.bin/')"
fi

- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: NINA_W102-${{ matrix.config }}-${{ github.sha }}
#name: nina-fw-${{ matrix.board }}${{ matrix.build_type == 'Debug' && format('-{0}', matrix.build_type) || '' }}
name: NINA_ADAFRUIT-${{ matrix.board }}-${{ matrix.build_type }}
path: |
NINA_W102*.bin
NINA_ADAFRUIT*.bin

# - name: Prepare Release Asset
# if: github.event_name == 'release' && matrix.build_type == 'Release'
# run: cp build/nina-fw.bin nina-fw-${{ matrix.board }}-${{ github.event.release.tag_name }}-${{ matrix.build_type }}.bin

- name: Upload Release Asset
uses: softprops/action-gh-release@v1
if: github.event_name == 'release' && matrix.config == 'release'
if: github.event_name == 'release'
with:
files: |
NINA_W102*.bin
NINA_ADAFRUIT*.bin
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
build/
*.bin
# Regenerate sdkconfig from the sdkconfig.defaults* files.
sdkconfig.esp32
sdkconfig.esp32c6
sdkconfig.*.old
sdkconfig.old
managed_components/
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
[submodule "certificates"]
path = certificates
url = https://github.com/adafruit/certificates
[submodule "esp-idf"]
path = esp-idf
url = https://github.com/espressif/esp-idf
[submodule "arduino-esp32"]
path = components/arduino-esp32
url = https://github.com/espressif/arduino-esp32
44 changes: 44 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# 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.16)

if (BOARD STREQUAL "fruitjam_c6")
set(IDF_TARGET esp32c6 CACHE STRING "Target ESP-IDF board")
elseif (BOARD STREQUAL "esp32")
set(IDF_TARGET esp32 CACHE STRING "Target ESP-IDF board")
else ()
message(FATAL_ERROR "Unsupported BOARD: ${BOARD}. Supported boards are: fruitjam_c6, esp32")
endif ()

# caused by esp-idf/components/bt/controller/esp32c6/bt.c:253:11: In function 'esp_bt_controller_log_init':
# error: 'task_create' may be used uninitialized [-Werror=maybe-uninitialized]
if (IDF_TARGET STREQUAL "esp32c6")
add_compile_options(-Wno-maybe-uninitialized)
endif ()

set(SDKCONFIG ${CMAKE_BINARY_DIR}/sdkconfig)
set(SDKCONFIG_DEFAULTS sdkconfig.defaults ${CMAKE_CURRENT_LIST_DIR}/boards/${BOARD}/sdkconfig)
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
list(APPEND SDKCONFIG_DEFAULTS sdkconfig.debug)
endif ()

include($ENV{IDF_PATH}/tools/cmake/project.cmake)

if (CMAKE_BUILD_TYPE STREQUAL "Debug")
add_compile_definitions(CMAKE_BUILD_TYPE_DEBUG)
endif ()

STRING(TOUPPER ${BOARD} BOARD_UPPER)
add_compile_definitions(
BOARD_${BOARD_UPPER}
)
set(EXTRA_COMPONENT_DIRS ${CMAKE_CURRENT_LIST_DIR}/boards)

project(nina-fw)

# Post build to run combine.py
add_custom_command(TARGET app POST_BUILD
COMMAND python ${CMAKE_CURRENT_LIST_DIR}/combine.py -b ${CMAKE_BINARY_DIR} NINA_ADAFRUIT-${BOARD}
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
VERBATIM
)
6 changes: 0 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,6 @@ CFLAGS += -DNDEBUG -DCONFIG_FREERTOS_ASSERT_DISABLE -Os -DLOG_LOCAL_LEVEL=0
CPPFLAGS += -DNDEBUG -Os
endif

NINA_DEBUG ?= 0
ifeq ($(NINA_DEBUG),1)
CFLAGS += -DNINA_DEBUG
CPPFLAGS += -DNINA_DEBUG
endif

ifeq ($(UNO_WIFI_REV2),1)
CFLAGS += -DUNO_WIFI_REV2
CPPFLAGS += -DUNO_WIFI_REV2
Expand Down
3 changes: 0 additions & 3 deletions arduino/component.mk

This file was deleted.

63 changes: 0 additions & 63 deletions arduino/cores/esp32/Arduino.h

This file was deleted.

45 changes: 0 additions & 45 deletions arduino/cores/esp32/Client.h

This file was deleted.

103 changes: 0 additions & 103 deletions arduino/cores/esp32/IPAddress.cpp

This file was deleted.

Loading