Skip to content

Commit

Permalink
Refactor and fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
GOB52 committed Jul 18, 2024
1 parent 03f0755 commit 08b6c70
Show file tree
Hide file tree
Showing 10 changed files with 447 additions and 159 deletions.
33 changes: 33 additions & 0 deletions lib/M5Utility/boards/m5stack-nanoc6.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"build": {
"core": "esp32",
"extra_flags": [
"-DARDUINO_M5Stack_NanoC6"
],
"f_cpu": "160000000L",
"f_flash": "80000000L",
"flash_mode": "qio",
"mcu": "esp32c6",
"variant": "esp32c6"
},
"connectivity": [
"wifi"
],
"debug": {
"openocd_target": "esp32c6.cfg"
},
"frameworks": [
"arduino",
"espidf"
],
"name": "M5Stack NanoC6",
"upload": {
"flash_size": "4MB",
"maximum_ram_size": 327680,
"maximum_size": 4194384,
"require_upload_port": true,
"speed": 460800
},
"url": "https://docs.m5stack.com/en/core/M5NanoC6",
"vendor": "M5Stack"
}
34 changes: 31 additions & 3 deletions lib/M5Utility/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ build_flags =-Wall -Wextra -Wreturn-local-addr -Werror=format -Werror=return-loc
lib_ldf_mode = deep
test_framework = googletest
test_build_src = true
;lib_deps=m5stack/M5Unified
lib_deps= https://github.com/m5stack/M5Unified.git#develop
lib_deps=m5stack/M5Unified

; --------------------------------
;Choose device
Expand Down Expand Up @@ -46,11 +45,31 @@ borad =m5stack-fire
extends = m5base
board = m5stack-stamps3

[AtomS3]
extends = m5base
board = m5stack-atoms3

; Using ./boards/m5stack-nanoc6.json
[NanoC6]
extends = m5base
board = m5stack-nanoc6
platform = https://github.com/platformio/platform-espressif32.git
platform_packages =
platformio/framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git
platformio/framework-arduinoespressif32-libs @ https://github.com/espressif/esp32-arduino-libs.git#idf-release/v5.1
board_build.partitions = default.csv

[native]
build_flags = -Os -xc++ -std=c++11
build_flags = -O3 -xc++ -std=c++14 -lSDL2
-arch arm64 ; for arm mac
-I"/usr/local/include/SDL2" ; for intel mac homebrew SDL2
-L"/usr/local/lib" ; for intel mac homebrew SDL2
-I"${sysenv.HOMEBREW_PREFIX}/include/SDL2" ; for arm mac homebrew SDL2
-L"${sysenv.HOMEBREW_PREFIX}/lib" ; for arm mac homebrew SDL2
platform = native
test_filter= native/*
test_ignore= embedded/*
lib_deps = ${env.lib_deps}

; --------------------------------
;Choose build options
Expand Down Expand Up @@ -111,3 +130,12 @@ extends=StampS3, option_release
extends=StampS3, option_release
lib_deps = ${env.lib_deps}
m5stack/M5Dial

[env:test_AtomS3]
extends=AtomS3, option_release
lib_deps = ${env.lib_deps}

[env:test_NanoC6]
extends=NanoC6, option_release
lib_deps = ${env.lib_deps}

20 changes: 15 additions & 5 deletions lib/M5Utility/src/M5Utility.hpp
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
/*
* SPDX-FileCopyrightText: 2024 M5Stack Technology CO LTD
*
* SPDX-License-Identifier: MIT
*/
/*!
@file M5Utility.hpp
@brief Main header of M5Utility
@mainpage M5Utility
Llibrary containing utilities common to M5 products. C++11 or later
SPDX-FileCopyrightText: 2024 M5Stack Technology CO LTD
SPDX-License-Identifier: MIT
*/
#ifndef M5_UTILITY_HPP
#define M5_UTILITY_HPP
Expand All @@ -20,6 +21,7 @@
#include "m5_utility/log/library_log.hpp"

#include "m5_utility/container/circular_buffer.hpp"
//#include "m5_utility/container/fixed_circular_buffer.hpp"

#include "m5_utility/bit_segment.hpp"
#include "m5_utility/compatibility_feature.hpp"
Expand All @@ -40,12 +42,20 @@ namespace m5 {
@namespace utility
@brief For utilities
*/
namespace utility {} // namespace utility
namespace utility {}

/*!
@namespace stl
@brief STL compatibility functions and classes
*/
namespace stl {}

/*!
@namespace container
@brief Container classes
*/
namespace container {}

} // namespace m5

#endif
Loading

0 comments on commit 08b6c70

Please sign in to comment.