Skip to content

Commit 81a78d7

Browse files
committed
update TinyUSB core to commit 11d669b4d2a40eb2fc5e51b2a9707a6de9d42363
Note: due to osal_freertos changes hathach/tinyusb#468 the Adafruit_TinyUSB_Core_init() should be near the task scheduler (or better inside loop task) to prevent calling portYIELD_FROM_ISR() when scheduler not started
1 parent 8e38fcd commit 81a78d7

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

cores/nRF5/TinyUSB/Adafruit_TinyUSB_nRF.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ extern "C" void USBD_IRQHandler(void)
4242
tud_int_handler(0);
4343

4444
#if CFG_SYSVIEW
45-
SEGGER_SYSVIEW_RecordExitISR();
45+
SEGGER_SYSVIEW_RecordExitISR();
4646
#endif
4747
}
4848

cores/nRF5/main.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,6 @@ int main( void )
7272
init();
7373
initVariant();
7474

75-
#ifdef USE_TINYUSB
76-
Adafruit_TinyUSB_Core_init();
77-
#endif
78-
7975
#if CFG_SYSVIEW
8076
SEGGER_SYSVIEW_Conf();
8177
#endif
@@ -86,6 +82,10 @@ int main( void )
8682
// Initialize callback task
8783
ada_callback_init(CALLBACK_STACK_SZ);
8884

85+
#ifdef USE_TINYUSB
86+
Adafruit_TinyUSB_Core_init();
87+
#endif
88+
8989
// Start FreeRTOS scheduler.
9090
vTaskStartScheduler();
9191

platform.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ nordic.path={build.core.path}/nordic
6060

6161
# build.logger_flags and build.sysview_flags and intentionally empty,
6262
# to allow modification via a user's own boards.local.txt or platform.local.txt files.
63-
build.flags.nrf= -DSOFTDEVICE_PRESENT -DARDUINO_NRF52_ADAFRUIT -DNRF52_SERIES -DLFS_NAME_MAX=64 -Ofast {build.debug_flags} {build.logger_flags} {build.sysview_flags} "-I{build.core.path}/cmsis/Core/Include" "-I{nordic.path}" "-I{nordic.path}/nrfx" "-I{nordic.path}/nrfx/hal" "-I{nordic.path}/nrfx/mdk" "-I{nordic.path}/nrfx/soc" "-I{nordic.path}/nrfx/drivers/include" "-I{nordic.path}/nrfx/drivers/src" "-I{nordic.path}/softdevice/{build.sd_name}_nrf52_{build.sd_version}_API/include" "-I{rtos.path}/Source/include" "-I{rtos.path}/config" "-I{rtos.path}/portable/GCC/nrf52" "-I{rtos.path}/portable/CMSIS/nrf52" "-I{build.core.path}/sysview/SEGGER" "-I{build.core.path}/sysview/Config" "-I{build.core.path}/TinyUSB" "-I{build.core.path}/TinyUSB/Adafruit_TinyUSB_ArduinoCore" "-I{build.core.path}/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src"
63+
build.flags.nrf= -DSOFTDEVICE_PRESENT -DARDUINO_NRF52_ADAFRUIT -DNRF52_SERIES -DLFS_NAME_MAX=64 -Ofast {build.debug_flags} {build.logger_flags} {build.sysview_flags} "-I{build.core.path}/cmsis/Core/Include" "-I{nordic.path}" "-I{nordic.path}/nrfx" "-I{nordic.path}/nrfx/hal" "-I{nordic.path}/nrfx/mdk" "-I{nordic.path}/nrfx/soc" "-I{nordic.path}/nrfx/drivers/include" "-I{nordic.path}/nrfx/drivers/src" "-I{nordic.path}/softdevice/{build.sd_name}_nrf52_{build.sd_version}_API/include" "-I{nordic.path}/softdevice/{build.sd_name}_nrf52_{build.sd_version}_API/include/nrf52" "-I{rtos.path}/Source/include" "-I{rtos.path}/config" "-I{rtos.path}/portable/GCC/nrf52" "-I{rtos.path}/portable/CMSIS/nrf52" "-I{build.core.path}/sysview/SEGGER" "-I{build.core.path}/sysview/Config" "-I{build.core.path}/TinyUSB" "-I{build.core.path}/TinyUSB/Adafruit_TinyUSB_ArduinoCore" "-I{build.core.path}/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src"
6464

6565
# usb flags
6666
build.flags.usb= -DUSBCON -DUSE_TINYUSB -DUSB_VID={build.vid} -DUSB_PID={build.pid} '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}'

tools/build_all.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
fail_count = 0
1111
skip_count = 0
1212

13-
build_format = '| {:20} | {:35} | {:9} '
13+
build_format = '| {:20} | {:35} | {:9} | {:6} |'
1414
build_separator = '-' * 83
1515

1616
default_boards = [ 'cluenrf52840', 'cplaynrf52840', 'feather52832', 'feather52840', 'feather52840sense', 'itsybitsy52840' ]
@@ -39,7 +39,7 @@ def build_examples(variant):
3939
print(build_separator)
4040
print('| {:^79} |'.format('Board ' + variant))
4141
print(build_separator)
42-
print((build_format + '| {:6} |').format('Library', 'Example', 'Result', 'Time'))
42+
print(build_format.format('Library', 'Example', 'Result', 'Time'))
4343
print(build_separator)
4444

4545
fqbn = "adafruit:nrf52:{}:softdevice={},debug=l0".format(variant, 's140v6' if variant != 'feather52832' else 's132v6')
@@ -83,7 +83,7 @@ def build_examples(variant):
8383

8484
build_duration = time.monotonic() - start_time
8585

86-
print((build_format + '| {:5.2f}s |').format(sketch.split(os.path.sep)[1], os.path.basename(sketch), success, build_duration))
86+
print(build_format.format(sketch.split(os.path.sep)[1], os.path.basename(sketch), success, '{:5.2f}s'.format(build_duration)))
8787

8888
if success != "\033[33mskipped\033[0m ":
8989
if build_result.returncode != 0:

0 commit comments

Comments
 (0)