summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/sbc_harness/fs_harness_flash_bin.c16
-rw-r--r--cmd/sbc_harness/main.c4
-rw-r--r--cmd/sbc_harness/tusb_log.c4
3 files changed, 11 insertions, 13 deletions
diff --git a/cmd/sbc_harness/fs_harness_flash_bin.c b/cmd/sbc_harness/fs_harness_flash_bin.c
index f353ddd..3c3fa16 100644
--- a/cmd/sbc_harness/fs_harness_flash_bin.c
+++ b/cmd/sbc_harness/fs_harness_flash_bin.c
@@ -41,7 +41,7 @@ static_assert(DATA_HSIZE % FLASH_SECTOR_SIZE == 0);
[[noreturn]] static void __no_inline_not_in_flash_func(ab_flash_finalize)(uint8_t *buf) {
assert(buf);
- log_infof("copying upper flash to lower flash...");
+ log_infoln("copying upper flash to lower flash...");
cr_save_and_disable_interrupts();
@@ -53,7 +53,7 @@ static_assert(DATA_HSIZE % FLASH_SECTOR_SIZE == 0);
flash_range_program(off, buf, FLASH_SECTOR_SIZE);
}
- log_infof("rebooting...");
+ log_infoln("rebooting...");
watchdog_reboot(0, 0, 300);
@@ -71,7 +71,7 @@ static void ab_flash_initialize_zero(uint8_t *buf) {
memset(buf, 0, FLASH_SECTOR_SIZE);
- log_infof("zeroing upper flash...");
+ log_infoln("zeroing upper flash...");
for (size_t off = DATA_HSIZE; off < DATA_SIZE; off += FLASH_SECTOR_SIZE) {
if (memcmp(buf, DATA_START+off, FLASH_SECTOR_SIZE) == 0)
continue;
@@ -84,7 +84,7 @@ static void ab_flash_initialize_zero(uint8_t *buf) {
flash_range_program(off, buf, FLASH_SECTOR_SIZE);
cr_restore_interrupts(saved);
}
- log_debugf("... zeroed");
+ log_debugln("... zeroed");
}
/**
@@ -95,7 +95,7 @@ static void ab_flash_initialize_zero(uint8_t *buf) {
static void ab_flash_initialize(uint8_t *buf) {
assert(buf);
- log_infof("initializing upper flash...");
+ log_infoln("initializing upper flash...");
for (size_t off = 0; off < DATA_HSIZE; off += FLASH_SECTOR_SIZE) {
memcpy(buf, DATA_START+off, FLASH_SECTOR_SIZE);
if (memcmp(buf, DATA_START+DATA_HSIZE+off, FLASH_SECTOR_SIZE) == 0)
@@ -105,7 +105,7 @@ static void ab_flash_initialize(uint8_t *buf) {
flash_range_program(DATA_HSIZE+off, buf, FLASH_SECTOR_SIZE);
cr_restore_interrupts(saved);
}
- log_debugf("... initialized");
+ log_debugln("... initialized");
}
/**
@@ -123,14 +123,14 @@ static void ab_flash_write_sector(size_t pos, uint8_t *dat) {
pos += DATA_HSIZE;
- log_infof("write flash sector @ %zu...", pos);
+ log_infoln("write flash sector @ %zu...", pos);
if (memcmp(dat, DATA_START+pos, FLASH_SECTOR_SIZE) != 0) {
bool saved = cr_save_and_disable_interrupts();
flash_range_erase(pos, FLASH_SECTOR_SIZE);
flash_range_program(pos, dat, FLASH_SECTOR_SIZE);
cr_restore_interrupts(saved);
}
- log_debugf("... written");
+ log_debugln("... written");
}
/* srv_file *******************************************************************/
diff --git a/cmd/sbc_harness/main.c b/cmd/sbc_harness/main.c
index 1fc76dc..0fb6e61 100644
--- a/cmd/sbc_harness/main.c
+++ b/cmd/sbc_harness/main.c
@@ -132,7 +132,7 @@ static COROUTINE hello_world_cr(void *_chan) {
for (size_t i = 0;; i = (i+1) % strlen(msg)) {
int result = usb_keyboard_rpc_send_req(chan, (uint32_t)msg[i]);
if (result < 1) {
- log_errorf("error sending rune U+%d", (uint32_t)msg[i]);
+ log_errorln("error sending rune U+", msg[i]);
break;
}
}
@@ -249,7 +249,7 @@ int main() {
bootclock = rp2040_hwtimer(0);
stdio_uart_init();
/* char *hdr = "=" * (80-strlen("info : MAIN: ")); */
- log_infof("===================================================================");
+ log_infoln("===================================================================");
coroutine_add("init", init_cr, NULL);
coroutine_main();
assert_notreached("all coroutines exited");
diff --git a/cmd/sbc_harness/tusb_log.c b/cmd/sbc_harness/tusb_log.c
index fe2c688..4629c04 100644
--- a/cmd/sbc_harness/tusb_log.c
+++ b/cmd/sbc_harness/tusb_log.c
@@ -9,7 +9,5 @@
void _libmisc_tu_mess_failed(const char *expr,
const char *file, unsigned int line, const char *func) {
- log_errorf("%s:%u:%s(): assertion \"%s\" failed",
- file, line, func,
- expr);
+ log_errorln(file, ":", line, ":", func, "(): assertion ", (qstr, expr), " failed");
}