mirror of
https://github.com/hathach/tinyusb.git
synced 2025-03-28 16:20:26 +00:00
commit
24c5e6ab45
@ -30,6 +30,7 @@
|
|||||||
#include "pico/unique_id.h"
|
#include "pico/unique_id.h"
|
||||||
#include "hardware/gpio.h"
|
#include "hardware/gpio.h"
|
||||||
#include "hardware/sync.h"
|
#include "hardware/sync.h"
|
||||||
|
#include "hardware/resets.h"
|
||||||
#include "hardware/structs/ioqspi.h"
|
#include "hardware/structs/ioqspi.h"
|
||||||
#include "hardware/structs/sio.h"
|
#include "hardware/structs/sio.h"
|
||||||
|
|
||||||
@ -166,6 +167,12 @@ void board_init(void)
|
|||||||
#if CFG_TUH_ENABLED
|
#if CFG_TUH_ENABLED
|
||||||
// set portfunc to host !!!
|
// set portfunc to host !!!
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if !CFG_TUD_ENABLED && !CFG_TUH_ENABLED
|
||||||
|
// board test exxample, reset usb controller
|
||||||
|
reset_block(RESETS_RESET_USBCTRL_BITS);
|
||||||
|
unreset_block_wait(RESETS_RESET_USBCTRL_BITS);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------+
|
//--------------------------------------------------------------------+
|
||||||
|
@ -115,7 +115,7 @@ def flash_jlink(board, firmware):
|
|||||||
|
|
||||||
def flash_openocd(board, firmware):
|
def flash_openocd(board, firmware):
|
||||||
ret = subprocess.run(
|
ret = subprocess.run(
|
||||||
f'openocd -c "adapter serial {board["flasher_sn"]}" {board["flasher_args"]} -c "program {firmware} reset exit"',
|
f'openocd -c "adapter serial {board["flasher_sn"]}" {board["flasher_args"]} -c "program {firmware}" -c "reset init" -c "resume" -c "exit"',
|
||||||
shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user