mirror of
https://gitea.osmocom.org/sim-card/simtrace2.git
synced 2026-03-17 21:58:33 +03:00
fix newline \n\r with \r\n
This commit is contained in:
@@ -113,15 +113,15 @@ extern int main(void)
|
||||
|
||||
EEFC_ReadUniqueID(g_unique_id);
|
||||
|
||||
printf("\n\r\n\r");
|
||||
printf("bootloader updater %s for board %s\n\r"
|
||||
"(C) 2010-2017 by Harald Welte, 2018-2019 by Kevin Redon\n\r",
|
||||
printf("\r\n\r\n");
|
||||
printf("bootloader updater %s for board %s\r\n"
|
||||
"(C) 2010-2017 by Harald Welte, 2018-2019 by Kevin Redon\r\n",
|
||||
manifest_revision, manifest_board);
|
||||
|
||||
/* clear g_dfu on power-up reset */
|
||||
memset(g_dfu, 0, sizeof(*g_dfu));
|
||||
|
||||
TRACE_INFO("USB init...\n\r");
|
||||
TRACE_INFO("USB init...\r\n");
|
||||
/* Signal USB reset by disabling the pull-up on USB D+ for at least 10 ms */
|
||||
USBD_Disconnect();
|
||||
|
||||
|
||||
@@ -160,7 +160,7 @@ extern int main(void)
|
||||
print_banner();
|
||||
board_main_top();
|
||||
|
||||
TRACE_INFO("USB init...\n\r");
|
||||
TRACE_INFO("USB init...\r\n");
|
||||
SIMtrace_USB_Initialize();
|
||||
|
||||
while (USBD_GetState() < USBD_STATE_CONFIGURED) {
|
||||
@@ -169,7 +169,7 @@ extern int main(void)
|
||||
#if 0
|
||||
if (i >= MAX_USB_ITER * 3) {
|
||||
TRACE_ERROR("Resetting board (USB could "
|
||||
"not be configured)\n\r");
|
||||
"not be configured)\r\n");
|
||||
USBD_Disconnect();
|
||||
NVIC_SystemReset();
|
||||
}
|
||||
@@ -177,19 +177,19 @@ extern int main(void)
|
||||
i++;
|
||||
}
|
||||
|
||||
TRACE_INFO("calling configure of all configurations...\n\r");
|
||||
TRACE_INFO("calling configure of all configurations...\r\n");
|
||||
for (i = 1; i < ARRAY_SIZE(config_func_ptrs); i++) {
|
||||
if (config_func_ptrs[i].configure)
|
||||
config_func_ptrs[i].configure();
|
||||
}
|
||||
|
||||
TRACE_INFO("calling init of config %u...\n\r", simtrace_config);
|
||||
TRACE_INFO("calling init of config %u...\r\n", simtrace_config);
|
||||
if (config_func_ptrs[simtrace_config].init) {
|
||||
config_func_ptrs[simtrace_config].init();
|
||||
}
|
||||
last_simtrace_config = simtrace_config;
|
||||
|
||||
TRACE_INFO("entering main loop...\n\r");
|
||||
TRACE_INFO("entering main loop...\r\n");
|
||||
while (1) {
|
||||
WDT_Restart(WDT);
|
||||
#if TRACE_LEVEL >= TRACE_LEVEL_DEBUG
|
||||
@@ -207,12 +207,12 @@ extern int main(void)
|
||||
isUsbConnected = 0;
|
||||
}
|
||||
} else if (isUsbConnected == 0) {
|
||||
TRACE_INFO("USB is now configured\n\r");
|
||||
TRACE_INFO("USB is now configured\r\n");
|
||||
|
||||
isUsbConnected = 1;
|
||||
}
|
||||
if (last_simtrace_config != simtrace_config) {
|
||||
TRACE_INFO("USB config chg %u -> %u\n\r",
|
||||
TRACE_INFO("USB config chg %u -> %u\r\n",
|
||||
last_simtrace_config, simtrace_config);
|
||||
if (config_func_ptrs[last_simtrace_config].exit) {
|
||||
config_func_ptrs[last_simtrace_config].exit();
|
||||
|
||||
@@ -78,9 +78,9 @@ int USBDFU_handle_dnload(uint8_t altif, unsigned int offset,
|
||||
}
|
||||
|
||||
#if TRACE_LEVEL >= TRACE_LEVEL_INFO
|
||||
TRACE_INFO("dnload(altif=%u, offset=%u, len=%u)\n\r", altif, offset, len);
|
||||
TRACE_INFO("dnload(altif=%u, offset=%u, len=%u)\r\n", altif, offset, len);
|
||||
#else
|
||||
printf("DL off=%u\n\r", offset);
|
||||
printf("DL off=%u\r\n", offset);
|
||||
#endif
|
||||
|
||||
#ifdef PINS_LEDS
|
||||
@@ -113,19 +113,19 @@ int USBDFU_handle_dnload(uint8_t altif, unsigned int offset,
|
||||
}
|
||||
rc = FLASHD_Unlock(addr, addr + len, 0, 0);
|
||||
if (rc != 0) {
|
||||
TRACE_ERROR("DFU download flash unlock failed\n\r");
|
||||
TRACE_ERROR("DFU download flash unlock failed\r\n");
|
||||
rc = DFU_RET_STALL;
|
||||
break;
|
||||
}
|
||||
rc = FLASHD_Write(addr, data, len);
|
||||
if (rc != 0) {
|
||||
TRACE_ERROR("DFU download flash erase failed\n\r");
|
||||
TRACE_ERROR("DFU download flash erase failed\r\n");
|
||||
rc = DFU_RET_STALL;
|
||||
break;
|
||||
}
|
||||
for (i = 0; i < len; i++) {
|
||||
if (((uint8_t*)addr)[i]!=data[i]) {
|
||||
TRACE_ERROR("DFU download flash data written not correct\n\r");
|
||||
TRACE_ERROR("DFU download flash data written not correct\r\n");
|
||||
rc = DFU_RET_STALL;
|
||||
break;
|
||||
}
|
||||
@@ -133,7 +133,7 @@ int USBDFU_handle_dnload(uint8_t altif, unsigned int offset,
|
||||
rc = DFU_RET_ZLP;
|
||||
break;
|
||||
default:
|
||||
TRACE_ERROR("DFU download for unknown AltIf %d\n\r", altif);
|
||||
TRACE_ERROR("DFU download for unknown AltIf %d\r\n", altif);
|
||||
rc = DFU_RET_STALL;
|
||||
break;
|
||||
}
|
||||
@@ -179,11 +179,11 @@ int USBDFU_handle_upload(uint8_t altif, unsigned int offset,
|
||||
memcpy(data, (void *)addr, req_len);
|
||||
break;
|
||||
default:
|
||||
TRACE_ERROR("DFU upload for unknown AltIf %d\n\r", altif);
|
||||
TRACE_ERROR("DFU upload for unknown AltIf %d\r\n", altif);
|
||||
/* FIXME: set error codes */
|
||||
return -1;
|
||||
}
|
||||
printf("=%u\n\r", req_len);
|
||||
printf("=%u\r\n", req_len);
|
||||
return req_len;
|
||||
}
|
||||
|
||||
@@ -274,16 +274,16 @@ extern int main(void)
|
||||
|
||||
EEFC_ReadUniqueID(g_unique_id);
|
||||
|
||||
printf("\n\r\n\r");
|
||||
printf("\r\n\r\n");
|
||||
print_line();
|
||||
printf("DFU bootloader %s for board %s\n\r"
|
||||
"(C) 2010-2017 by Harald Welte, 2018-2019 by Kevin Redon\n\r",
|
||||
printf("DFU bootloader %s for board %s\r\n"
|
||||
"(C) 2010-2017 by Harald Welte, 2018-2019 by Kevin Redon\r\n",
|
||||
manifest_revision, manifest_board);
|
||||
print_line();
|
||||
|
||||
#if (TRACE_LEVEL >= TRACE_LEVEL_INFO)
|
||||
TRACE_INFO("Chip ID: 0x%08lx (Ext 0x%08lx)\n\r", CHIPID->CHIPID_CIDR, CHIPID->CHIPID_EXID);
|
||||
TRACE_INFO("Serial Nr. %08x-%08x-%08x-%08x\n\r",
|
||||
TRACE_INFO("Chip ID: 0x%08lx (Ext 0x%08lx)\r\n", CHIPID->CHIPID_CIDR, CHIPID->CHIPID_EXID);
|
||||
TRACE_INFO("Serial Nr. %08x-%08x-%08x-%08x\r\n",
|
||||
g_unique_id[0], g_unique_id[1],
|
||||
g_unique_id[2], g_unique_id[3]);
|
||||
static const char* reset_causes[] = {
|
||||
@@ -294,9 +294,9 @@ extern int main(void)
|
||||
"user reset (NRST pin detected low)",
|
||||
};
|
||||
if (reset_cause < ARRAY_SIZE(reset_causes)) {
|
||||
TRACE_INFO("Reset Cause: %s\n\r", reset_causes[reset_cause]);
|
||||
TRACE_INFO("Reset Cause: %s\r\n", reset_causes[reset_cause]);
|
||||
} else {
|
||||
TRACE_INFO("Reset Cause: 0x%lx\n\r", (RSTC->RSTC_SR & RSTC_SR_RSTTYP_Msk) >> RSTC_SR_RSTTYP_Pos);
|
||||
TRACE_INFO("Reset Cause: 0x%lx\r\n", (RSTC->RSTC_SR & RSTC_SR_RSTTYP_Msk) >> RSTC_SR_RSTTYP_Pos);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -306,25 +306,25 @@ extern int main(void)
|
||||
switch (USBDFU_OverrideEnterDFU()) {
|
||||
case 0:
|
||||
if (SCB->VTOR < IFLASH_ADDR + BOARD_DFU_BOOT_SIZE) {
|
||||
TRACE_INFO_WP("unknown\n\r");
|
||||
TRACE_INFO_WP("unknown\r\n");
|
||||
} else {
|
||||
TRACE_INFO_WP("DFU is the main application\n\r");
|
||||
TRACE_INFO_WP("DFU is the main application\r\n");
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
TRACE_INFO_WP("DFU switch requested by main application\n\r");
|
||||
TRACE_INFO_WP("DFU switch requested by main application\r\n");
|
||||
break;
|
||||
case 2:
|
||||
TRACE_INFO_WP("bootloader forced (button pressed or jumper set)\n\r");
|
||||
TRACE_INFO_WP("bootloader forced (button pressed or jumper set)\r\n");
|
||||
break;
|
||||
case 3:
|
||||
TRACE_INFO_WP("stack pointer (first application word) does no point in RAM\n\r");
|
||||
TRACE_INFO_WP("stack pointer (first application word) does no point in RAM\r\n");
|
||||
break;
|
||||
case 4: // the is no reason
|
||||
TRACE_INFO_WP("reset vector (second application word) does no point in flash\n\r");
|
||||
TRACE_INFO_WP("reset vector (second application word) does no point in flash\r\n");
|
||||
break;
|
||||
default:
|
||||
TRACE_INFO_WP("unknown\n\r");
|
||||
TRACE_INFO_WP("unknown\r\n");
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
@@ -335,7 +335,7 @@ extern int main(void)
|
||||
|
||||
board_main_top();
|
||||
|
||||
TRACE_INFO("USB init...\n\r");
|
||||
TRACE_INFO("USB init...\r\n");
|
||||
/* Signal USB reset by disabling the pull-up on USB D+ for at least 10 ms */
|
||||
USBD_Disconnect();
|
||||
mdelay(500);
|
||||
@@ -346,7 +346,7 @@ extern int main(void)
|
||||
check_exec_dbg_cmd();
|
||||
#if 1
|
||||
if (i >= MAX_USB_ITER * 3) {
|
||||
TRACE_ERROR("Resetting board (USB could not be configured)\n\r");
|
||||
TRACE_ERROR("Resetting board (USB could not be configured)\r\n");
|
||||
g_dfu->magic = USB_DFU_MAGIC; // start the bootloader after reboot
|
||||
USBD_Disconnect();
|
||||
NVIC_SystemReset();
|
||||
@@ -358,7 +358,7 @@ extern int main(void)
|
||||
/* Initialize the flash to be able to write it, using the IAP ROM code */
|
||||
FLASHD_Initialize(BOARD_MCK, 1);
|
||||
|
||||
TRACE_INFO("entering main loop...\n\r");
|
||||
TRACE_INFO("entering main loop...\r\n");
|
||||
while (1) {
|
||||
WDT_Restart(WDT);
|
||||
#if TRACE_LEVEL >= TRACE_LEVEL_DEBUG
|
||||
@@ -378,7 +378,7 @@ extern int main(void)
|
||||
isUsbConnected = 0;
|
||||
}
|
||||
} else if (isUsbConnected == 0) {
|
||||
TRACE_INFO("USB is now configured\n\r");
|
||||
TRACE_INFO("USB is now configured\r\n");
|
||||
|
||||
isUsbConnected = 1;
|
||||
}
|
||||
|
||||
@@ -32,17 +32,17 @@ extern int main(void)
|
||||
PIO_InitializeInterrupts(0);
|
||||
|
||||
|
||||
printf("\n\r\n\r"
|
||||
"=============================================================================\n\r"
|
||||
"Freq Ctr firmware " GIT_VERSION " (C) 2019 by Harald Welte\n\r"
|
||||
"=============================================================================\n\r");
|
||||
printf("\r\n\r\n"
|
||||
"=============================================================================\r\n"
|
||||
"Freq Ctr firmware " GIT_VERSION " (C) 2019 by Harald Welte\r\n"
|
||||
"=============================================================================\r\n");
|
||||
|
||||
board_main_top();
|
||||
|
||||
TRACE_INFO("starting frequency counter...\n\r");
|
||||
TRACE_INFO("starting frequency counter...\r\n");
|
||||
freq_ctr_init();
|
||||
|
||||
TRACE_INFO("entering main loop...\n\r");
|
||||
TRACE_INFO("entering main loop...\r\n");
|
||||
while (1) {
|
||||
WDT_Restart(WDT);
|
||||
|
||||
|
||||
@@ -4,5 +4,5 @@
|
||||
|
||||
void gpio_test_init(void)
|
||||
{
|
||||
printf("FIXME run tests here\n\r");
|
||||
printf("FIXME run tests here\r\n");
|
||||
}
|
||||
|
||||
@@ -32,17 +32,17 @@ extern int main(void)
|
||||
PIO_InitializeInterrupts(0);
|
||||
|
||||
|
||||
printf("\n\r\n\r"
|
||||
"=============================================================================\n\r"
|
||||
"GPIO Test firmware " GIT_VERSION " (C) 2019 Sysmocom GmbH\n\r"
|
||||
"=============================================================================\n\r");
|
||||
printf("\r\n\r\n"
|
||||
"=============================================================================\r\n"
|
||||
"GPIO Test firmware " GIT_VERSION " (C) 2019 Sysmocom GmbH\r\n"
|
||||
"=============================================================================\r\n");
|
||||
|
||||
board_main_top();
|
||||
|
||||
TRACE_INFO("starting gpio test...\n\r");
|
||||
TRACE_INFO("starting gpio test...\r\n");
|
||||
gpio_test_init();
|
||||
|
||||
TRACE_INFO("entering main loop...\n\r");
|
||||
TRACE_INFO("entering main loop...\r\n");
|
||||
while (1) {
|
||||
WDT_Restart(WDT);
|
||||
|
||||
|
||||
@@ -156,7 +156,7 @@ extern int main(void)
|
||||
print_banner();
|
||||
board_main_top();
|
||||
|
||||
TRACE_INFO("USB init...\n\r");
|
||||
TRACE_INFO("USB init...\r\n");
|
||||
SIMtrace_USB_Initialize();
|
||||
|
||||
while (USBD_GetState() < USBD_STATE_CONFIGURED) {
|
||||
@@ -165,7 +165,7 @@ extern int main(void)
|
||||
#if 0
|
||||
if (i >= MAX_USB_ITER * 3) {
|
||||
TRACE_ERROR("Resetting board (USB could "
|
||||
"not be configured)\n\r");
|
||||
"not be configured)\r\n");
|
||||
USBD_Disconnect();
|
||||
NVIC_SystemReset();
|
||||
}
|
||||
@@ -173,17 +173,17 @@ extern int main(void)
|
||||
i++;
|
||||
}
|
||||
|
||||
TRACE_INFO("calling configure of all configurations...\n\r");
|
||||
TRACE_INFO("calling configure of all configurations...\r\n");
|
||||
for (i = 1; i < ARRAY_SIZE(config_func_ptrs); i++) {
|
||||
if (config_func_ptrs[i].configure)
|
||||
config_func_ptrs[i].configure();
|
||||
}
|
||||
|
||||
TRACE_INFO("calling init of config %u...\n\r", simtrace_config);
|
||||
TRACE_INFO("calling init of config %u...\r\n", simtrace_config);
|
||||
config_func_ptrs[simtrace_config].init();
|
||||
last_simtrace_config = simtrace_config;
|
||||
|
||||
TRACE_INFO("entering main loop...\n\r");
|
||||
TRACE_INFO("entering main loop...\r\n");
|
||||
while (1) {
|
||||
WDT_Restart(WDT);
|
||||
#if TRACE_LEVEL >= TRACE_LEVEL_DEBUG
|
||||
@@ -201,12 +201,12 @@ extern int main(void)
|
||||
isUsbConnected = 0;
|
||||
}
|
||||
} else if (isUsbConnected == 0) {
|
||||
TRACE_INFO("USB is now configured\n\r");
|
||||
TRACE_INFO("USB is now configured\r\n");
|
||||
|
||||
isUsbConnected = 1;
|
||||
}
|
||||
if (last_simtrace_config != simtrace_config) {
|
||||
TRACE_INFO("USB config chg %u -> %u\n\r",
|
||||
TRACE_INFO("USB config chg %u -> %u\r\n",
|
||||
last_simtrace_config, simtrace_config);
|
||||
config_func_ptrs[last_simtrace_config].exit();
|
||||
config_func_ptrs[simtrace_config].init();
|
||||
|
||||
Reference in New Issue
Block a user