diff options
| author | hathach <[email protected]> | 2020-06-30 01:55:57 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2020-06-30 01:55:57 +0700 |
| commit | ab75998316fe714675e1193f0a7c06a32387ebd6 (patch) | |
| tree | 59158f32240bd9464214dfa38a1bc3237faadf6e /examples | |
| parent | 2b1c7730b719c6d4abd7d1bfbfdb80b0d64ee892 (diff) | |
| parent | 2b9466dbc03221774d0f8943b7f07940c81d885d (diff) | |
Merge branch 'master' into add-stm-hs
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/device/board_test/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | examples/device/cdc_msc_freertos/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | examples/device/cdc_msc_freertos/src/tusb_config.h | 6 | ||||
| -rw-r--r-- | examples/device/hid_composite_freertos/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | examples/readme.md | 7 | ||||
| -rw-r--r-- | examples/rules.mk | 5 |
6 files changed, 16 insertions, 8 deletions
diff --git a/examples/device/board_test/CMakeLists.txt b/examples/device/board_test/CMakeLists.txt index 4f0359922..f0437dd04 100644 --- a/examples/device/board_test/CMakeLists.txt +++ b/examples/device/board_test/CMakeLists.txt @@ -7,7 +7,7 @@ set(TOP "../../..") get_filename_component(TOP "${TOP}" REALPATH) # Add example src and bsp directories -set(EXTRA_COMPONENT_DIRS "src" "${TOP}/hw/bsp/esp32s2_saola_1") +set(EXTRA_COMPONENT_DIRS "src" "${TOP}/hw/bsp/${BOARD}") include($ENV{IDF_PATH}/tools/cmake/project.cmake) set(SUPPORTED_TARGETS esp32s2) diff --git a/examples/device/cdc_msc_freertos/CMakeLists.txt b/examples/device/cdc_msc_freertos/CMakeLists.txt index b0e2c2cea..339f43a09 100644 --- a/examples/device/cdc_msc_freertos/CMakeLists.txt +++ b/examples/device/cdc_msc_freertos/CMakeLists.txt @@ -7,7 +7,7 @@ set(TOP "../../..") get_filename_component(TOP "${TOP}" REALPATH) # Add example src and bsp directories -set(EXTRA_COMPONENT_DIRS "src" "${TOP}/hw/bsp/esp32s2_saola_1") +set(EXTRA_COMPONENT_DIRS "src" "${TOP}/hw/bsp/${BOARD}") include($ENV{IDF_PATH}/tools/cmake/project.cmake) set(SUPPORTED_TARGETS esp32s2) diff --git a/examples/device/cdc_msc_freertos/src/tusb_config.h b/examples/device/cdc_msc_freertos/src/tusb_config.h index 379fab971..f7e48f66e 100644 --- a/examples/device/cdc_msc_freertos/src/tusb_config.h +++ b/examples/device/cdc_msc_freertos/src/tusb_config.h @@ -67,8 +67,10 @@ // This examples use FreeRTOS #define CFG_TUSB_OS OPT_OS_FREERTOS -// CFG_TUSB_DEBUG is defined by compiler in DEBUG build -// #define CFG_TUSB_DEBUG 0 +// can be defined by compiler in DEBUG build +#ifndef CFG_TUSB_DEBUG + #define CFG_TUSB_DEBUG 0 +#endif /* USB DMA on some MCUs can only access a specific SRAM region with restriction on alignment. * Tinyusb use follows macros to declare transferring memory so that they can be put diff --git a/examples/device/hid_composite_freertos/CMakeLists.txt b/examples/device/hid_composite_freertos/CMakeLists.txt index bfd0677e0..a429a1336 100644 --- a/examples/device/hid_composite_freertos/CMakeLists.txt +++ b/examples/device/hid_composite_freertos/CMakeLists.txt @@ -7,7 +7,7 @@ set(TOP "../../..") get_filename_component(TOP "${TOP}" REALPATH) # Add example src and bsp directories -set(EXTRA_COMPONENT_DIRS "src" "${TOP}/hw/bsp/esp32s2_saola_1") +set(EXTRA_COMPONENT_DIRS "src" "${TOP}/hw/bsp/${BOARD}") include($ENV{IDF_PATH}/tools/cmake/project.cmake) set(SUPPORTED_TARGETS esp32s2) diff --git a/examples/readme.md b/examples/readme.md index 1c85214e9..ca28d4881 100644 --- a/examples/readme.md +++ b/examples/readme.md @@ -32,6 +32,13 @@ Then compile with `make BOARD=[your_board] all`, for example $ make BOARD=feather_nrf52840_express all ``` + +To compile for debugging with debug symbols add DEBUG=1, for example + +``` +$ make BOARD=feather_nrf52840_express DEBUG=1 all +``` + ### Debug Log ### Log Level diff --git a/examples/rules.mk b/examples/rules.mk index 2f4c8b860..eeb548d08 100644 --- a/examples/rules.mk +++ b/examples/rules.mk @@ -12,11 +12,10 @@ all: idf.py -B$(BUILD) -DBOARD=$(BOARD) build clean: - idf.py -B$(BUILD) clean + idf.py -B$(BUILD) -DBOARD=$(BOARD) clean flash: - @:$(call check_defined, SERIAL, example: SERIAL=/dev/ttyUSB0) - idf.py -B$(BUILD) -p $(SERIAL) flash + idf.py -B$(BUILD) -DBOARD=$(BOARD) flash else # GNU Make build system |
