diff --git a/cores/nRF5/TinyUSB/Adafruit_TinyUSB_ArduinoCore b/cores/nRF5/TinyUSB/Adafruit_TinyUSB_ArduinoCore index 07490772..11d669b4 160000 --- a/cores/nRF5/TinyUSB/Adafruit_TinyUSB_ArduinoCore +++ b/cores/nRF5/TinyUSB/Adafruit_TinyUSB_ArduinoCore @@ -1 +1 @@ -Subproject commit 07490772a559b2b0cac8aa187566aff4bec7376a +Subproject commit 11d669b4d2a40eb2fc5e51b2a9707a6de9d42363 diff --git a/cores/nRF5/TinyUSB/Adafruit_TinyUSB_nRF.cpp b/cores/nRF5/TinyUSB/Adafruit_TinyUSB_nRF.cpp index 919e89a8..1873e3fc 100644 --- a/cores/nRF5/TinyUSB/Adafruit_TinyUSB_nRF.cpp +++ b/cores/nRF5/TinyUSB/Adafruit_TinyUSB_nRF.cpp @@ -42,7 +42,7 @@ extern "C" void USBD_IRQHandler(void) tud_int_handler(0); #if CFG_SYSVIEW - SEGGER_SYSVIEW_RecordExitISR(); + SEGGER_SYSVIEW_RecordExitISR(); #endif } diff --git a/cores/nRF5/main.cpp b/cores/nRF5/main.cpp index 1998345e..c3ac0894 100644 --- a/cores/nRF5/main.cpp +++ b/cores/nRF5/main.cpp @@ -72,10 +72,6 @@ int main( void ) init(); initVariant(); -#ifdef USE_TINYUSB - Adafruit_TinyUSB_Core_init(); -#endif - #if CFG_SYSVIEW SEGGER_SYSVIEW_Conf(); #endif @@ -86,6 +82,10 @@ int main( void ) // Initialize callback task ada_callback_init(CALLBACK_STACK_SZ); +#ifdef USE_TINYUSB + Adafruit_TinyUSB_Core_init(); +#endif + // Start FreeRTOS scheduler. vTaskStartScheduler(); diff --git a/platform.txt b/platform.txt index 358ade4d..f8f47382 100644 --- a/platform.txt +++ b/platform.txt @@ -60,7 +60,7 @@ nordic.path={build.core.path}/nordic # build.logger_flags and build.sysview_flags and intentionally empty, # to allow modification via a user's own boards.local.txt or platform.local.txt files. -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" +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" # usb flags build.flags.usb= -DUSBCON -DUSE_TINYUSB -DUSB_VID={build.vid} -DUSB_PID={build.pid} '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}' diff --git a/tools/build_all.py b/tools/build_all.py index 62f46757..b9f99262 100644 --- a/tools/build_all.py +++ b/tools/build_all.py @@ -10,7 +10,7 @@ success_count = 0 fail_count = 0 skip_count = 0 -build_format = '| {:20} | {:35} | {:9} ' +build_format = '| {:20} | {:35} | {:9} | {:6} |' build_separator = '-' * 83 default_boards = [ 'cluenrf52840', 'cplaynrf52840', 'feather52832', 'feather52840', 'feather52840sense', 'itsybitsy52840' ] @@ -39,7 +39,7 @@ def build_examples(variant): print(build_separator) print('| {:^79} |'.format('Board ' + variant)) print(build_separator) - print((build_format + '| {:6} |').format('Library', 'Example', 'Result', 'Time')) + print(build_format.format('Library', 'Example', 'Result', 'Time')) print(build_separator) fqbn = "adafruit:nrf52:{}:softdevice={},debug=l0".format(variant, 's140v6' if variant != 'feather52832' else 's132v6') @@ -83,7 +83,7 @@ def build_examples(variant): build_duration = time.monotonic() - start_time - print((build_format + '| {:5.2f}s |').format(sketch.split(os.path.sep)[1], os.path.basename(sketch), success, build_duration)) + print(build_format.format(sketch.split(os.path.sep)[1], os.path.basename(sketch), success, '{:5.2f}s'.format(build_duration))) if success != "\033[33mskipped\033[0m ": if build_result.returncode != 0: