From 4db038c4b75fab6b675be2673fa833cd99987a9e Mon Sep 17 00:00:00 2001 From: surenyi Date: Tue, 28 May 2019 17:46:55 +0800 Subject: [PATCH] xc_ppf1901: fixed Signed-off-by: surenyi --- lib/printf.c | 4 ++++ targets/xc_ppf1901/retarget.c | 8 +++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/printf.c b/lib/printf.c index f85aac0..579462e 100644 --- a/lib/printf.c +++ b/lib/printf.c @@ -118,6 +118,10 @@ static int print( char **out, const char *format, va_list args ) ++format; pad = PAD_RIGHT; } + if (*format == 'l') { + ++format; + } + while (*format == '0') { ++format; pad |= PAD_ZERO; diff --git a/targets/xc_ppf1901/retarget.c b/targets/xc_ppf1901/retarget.c index 578810d..2240dde 100644 --- a/targets/xc_ppf1901/retarget.c +++ b/targets/xc_ppf1901/retarget.c @@ -58,8 +58,10 @@ void lowlevel_init(void) { NVIC_SetVectorTable(NVIC_VectTab_FLASH, (APP_ADDRESS - NVIC_VectTab_FLASH)); NVIC_PriorityGroupConfig(NVIC_PriorityGroup_4); - __enable_irq(); + init_board(); + + __enable_irq(); } #else void lowlevel_init(void) @@ -136,7 +138,7 @@ static int do_sc18is_rst(cmd_tbl_t s, int argc, char *argv[]) return 0; } -CON_CMD(sc18is_rst, 1, "reset sc18is602", do_sc18is_rst); +CON_CMD(scrst, 1, "reset sc18is602", do_sc18is_rst); static int do_flash_id(cmd_tbl_t s, int argc, char *argv[]) { @@ -145,5 +147,5 @@ static int do_flash_id(cmd_tbl_t s, int argc, char *argv[]) return 0; } -CON_CMD(flash_id, 1, "read flash id", do_flash_id); +CON_CMD(n25qid, 1, "read flash id", do_flash_id);