Skip to content
This repository was archived by the owner on Aug 25, 2024. It is now read-only.
Open
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
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ Archive/**

build
.images

managed_components
4 changes: 3 additions & 1 deletion devices/mbits-esp32s2-wrover/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
build
sdkconfig.old
sdkconfig.old
managed_components
managed_components
63 changes: 49 additions & 14 deletions devices/mbits-esp32s2-wrover/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,31 +29,66 @@ list(APPEND EXTRA_COMPONENT_DIRS
${COMPONENT_DIR}/ROSMicroPy
)

set(IDF_TARGET esp32)
# Set the board if it's not already set.
if(NOT MICROPY_BOARD)
set(MICROPY_BOARD ESP32_GENERIC)
endif()
get_filename_component(MICROPY_DIR ${PROJECT_DIR}/../../libs/micropython ABSOLUTE)
set (MICROPY_ARCH_DIR ${MICROPY_DIR}/ports/${IDF_TARGET} )
set (MICROPY_BOARD_DIR ${MICROPY_ARCH_DIR}/boards/${MICROPY_BOARD})

file(WRITE ${CMAKE_BINARY_DIR}/sdkconfig.combined.in "")

#
# Project Config
#
file(READ ${PROJECT_DIR}/sdkconfig CONTENTS)
file(APPEND ${CMAKE_BINARY_DIR}/sdkconfig.combined.in "${CONTENTS}")

message ("\r\nMicropython CMake #1")
message ("Project Dir: ${PROJECT_DIR}")
message ("CMake Source Dir: ${CMAKE_SOURCE_DIR}")
message ("Micropython Dir: ${MICROPY_DIR}")
message( "MicroPy Arch Dir: ${MICROPY_ARCH_DIR}")
message( "MicroPy Board Dir: ${MICROPY_BOARD_DIR}")

# Include board config; this is expected to set (among other options):
# - SDKCONFIG_DEFAULTS
# - IDF_TARGET
include(${MICROPY_BOARD_DIR}/mpconfigboard.cmake)

message("\r\nWrite Config File Starting..")

#
# Micropython Config
#
message("\r\n\nSDK Defaults ${SDKCONFIG_DEFAULTS}")
message("MICROPY Archdir: ${MICROPY_ARCH_DIR}")
include(${MICROPY_BOARD_DIR}/mpconfigboard.cmake)

set(SDK_CONFIG_FILE_IN ${PROJECT_DIR}/sdkconfig)
set(SDK_CONFIG_FILE ${PROJECT_DIR}/sdkconfig.combined)
set(SDK_CONFIG_FILE_BUILD ${CMAKE_BINARY_DIR}/sdkconfig)

# Concatenate all sdkconfig files into a combined one for the IDF to use.
file(WRITE ${SDK_CONFIG_FILE} "")

#
# Main Project config
#
file(READ ${SDK_CONFIG_FILE_IN} CONTENTS)
file(APPEND ${SDK_CONFIG_FILE} "${CONTENTS}")

#
# Micropython Support
#
foreach(SDKCONFIG_DEFAULT ${SDKCONFIG_DEFAULTS})
set(SDKCONFIG_DEFAULT_FULLPATH ${MICROPY_ARCH_DIR}/${SDKCONFIG_DEFAULT})
message("SDK DEFAULT: ${SDK_DEFAULT_FULLPATH}")
message("SDK DEFAULT FULL: ${SDKCONFIG_DEFAULT_FULLPATH}")
file(READ ${SDKCONFIG_DEFAULT_FULLPATH} CONTENTS)
file(APPEND ${CMAKE_BINARY_DIR}/sdkconfig.combined.in "${CONTENTS}")
file(APPEND ${SDK_CONFIG_FILE} "${CONTENTS}")
endforeach()
configure_file(${CMAKE_BINARY_DIR}/sdkconfig.combined.in ${CMAKE_BINARY_DIR}/sdkconfig COPYONLY)
set(SDKCONFIG_DEFAULTS ${CMAKE_BINARY_DIR}/sdkconfig)

message("\r\nSDK_CONFIG_FILE ${SDK_CONFIG_FILE}")
message("\r\nSDK_CONFIG_FILE_BUILD ${SDK_CONFIG_FILE_BUILD}")
#
# Write Output
#
configure_file(${SDK_CONFIG_FILE} ${SDK_CONFIG_FILE_BUILD} )
set(SDKCONFIG_DEFAULTS ${SDK_CONFIG_FILE_BUILD})

message("\r\nWrite Config File Complete")

include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(mbits-esp32s2-wrover)
Expand Down
3 changes: 2 additions & 1 deletion devices/mbits-esp32s2-wrover/clean
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ clear
idf.py clean
idf.py fullclean
rm -rf ./build
idf.py build
idf.py reconfigure



14 changes: 10 additions & 4 deletions devices/mbits-esp32s2-wrover/dependencies.lock
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
dependencies:
ROSMicroPy:
component_hash: null
source:
path: /opt/rosmicropy/extra_packages/ROSMicroPy/main_esp32
type: local
version: '*'
espressif/mdns:
component_hash: d96d277207c4fec77ec290b7a8b0ca4043e10f407df0ff6aa52e54a94f0c54a5
component_hash: 46ee81d32fbf850462d8af1e83303389602f6a6a9eddd2a55104cb4c063858ed
source:
service_url: https://api.components.espressif.com/
type: service
version: 1.2.4
version: 1.1.0
idf:
component_hash: null
source:
type: idf
version: 5.1.2
manifest_hash: f1a572a6b8b65aece61b0a0f76d62584e1a3d1245f1ab9b4ca2e98bd39ba616e
version: 5.1.3
manifest_hash: 05172dac7e7c17ef4f869ca444c8d81e91435c460889f1960a676ed43dda1ef9
target: esp32
version: 1.0.0
6 changes: 2 additions & 4 deletions devices/mbits-esp32s2-wrover/main/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
message ("\r\nIn main component cmake file")
message ("\r\nEnter main component cmake file")

message ("\r\n Project Dir: ${PROJECT_DIR}")
message ("\r\n CMake Source Dir: ${CMAKE_SOURCE_DIR}")
message ("\r\n Component Dir is ${COMPONENT_DIR}")

message ("\r\nExit main component cmake file")
4 changes: 3 additions & 1 deletion devices/mbits-esp32s2-wrover/main/idf_component.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
## IDF Component Manager Manifest File
dependencies:
espressif/mdns: "*"
#espressif/mdns: "*"
## Required IDF version
ROSMicroPy:
path: '../../../extra_packages/ROSMicroPy/main_esp32'
idf:
version: ">=4.1.0"
# # Put list of dependencies here
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Loading