shell: jtag: add command to enable/disable JTAG
This commit is contained in:
parent
efb5a23859
commit
3484a7b3f6
3 changed files with 10 additions and 1 deletions
|
@ -17,6 +17,7 @@
|
|||
#include <shell/boot.h>
|
||||
#include <shell/buzzer.h>
|
||||
#include <shell/echo.h>
|
||||
#include <shell/jtag.h>
|
||||
#include <shell/led.h>
|
||||
#include <shell/mufs.h>
|
||||
#include <shell/rtc.h>
|
||||
|
@ -45,6 +46,9 @@ struct cmd user_cmds[] = {
|
|||
|
||||
struct cmd admin_cmds[] = {
|
||||
{ "echo", shell_echo },
|
||||
#ifdef STM32F1
|
||||
{ "jtag", shell_jtag },
|
||||
#endif
|
||||
{ "buzzer", shell_buzzer },
|
||||
{ "led", shell_led },
|
||||
{ "reset", shell_alarm },
|
||||
|
|
|
@ -30,7 +30,8 @@ int gpio_init(void)
|
|||
GPIO1);
|
||||
|
||||
/* Set up GPIOs for timers. */
|
||||
gpio_primary_remap(0, AFIO_MAPR_TIM2_REMAP_PARTIAL_REMAP1);
|
||||
gpio_primary_remap(AFIO_MAPR_SWJ_CFG_JTAG_OFF_SW_ON,
|
||||
AFIO_MAPR_TIM2_REMAP_PARTIAL_REMAP1);
|
||||
gpio_set_mode(GPIOA, GPIO_MODE_OUTPUT_50_MHZ,
|
||||
GPIO_CNF_OUTPUT_ALTFN_PUSHPULL, GPIO_TIM2_PR1_CH1_ETR);
|
||||
|
||||
|
|
|
@ -11,3 +11,7 @@ obj-y += source/shell/mufs.o
|
|||
obj-y += source/shell/progress.o
|
||||
obj-y += source/shell/rtc.o
|
||||
obj-y += source/shell/version.o
|
||||
|
||||
ifeq (${TARGET},stm32f1)
|
||||
obj-y += source/shell/jtag.o
|
||||
endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue