[riot-notifications] [RIOT-OS/RIOT] cpu/mips32r2_common: Added call to stdio_init() (#12227)

François Berder notifications at github.com
Mon Sep 16 23:25:53 CEST 2019


Hello,

I compiled hello-world and ran it on pic32-wifire. The bug you mentioned was actually not present on pic32 boards because uart_init is called from cpu_init so uart would get initialized. I had to make additional changes (see the diff below), but I think that is outside the scope of this PR. So ACK ! 
```
diff --git a/boards/pic32-wifire/include/board.h b/boards/pic32-wifire/include/board.h
index 2a4542408..251071585 100644
--- a/boards/pic32-wifire/include/board.h
+++ b/boards/pic32-wifire/include/board.h
@@ -81,6 +81,12 @@ extern "C" {
  */
 void board_init(void);
 
+
+/**
+ * @brief   Use the 2nd UART for STDIO on this board
+ */
+#define STDIO_UART_DEV      UART_DEV(4)
+
 #ifdef __cplusplus
 }
 #endif
diff --git a/boards/pic32-wifire/wifire.c b/boards/pic32-wifire/wifire.c
index 9fe3b221a..3e12bbfbf 100644
--- a/boards/pic32-wifire/wifire.c
+++ b/boards/pic32-wifire/wifire.c
@@ -28,11 +28,6 @@ void board_init(void)
     U4RXR =   0xb;            /* connect pin RPF2 to UART 4 RX */
     RPF8R =   0x2;            /* connect pin RPF8 to UART 4 TX */
 
-    /* intialise UART used for debug (printf) */
-#ifdef DEBUG_VIA_UART
-    uart_init(DEBUG_VIA_UART, DEBUG_UART_BAUD, NULL, 0);
-#endif
-
     /* Turn off all LED's */
     gpio_init(LED1_PIN, GPIO_OUT);
     gpio_init(LED2_PIN, GPIO_OUT);
diff --git a/cpu/mips32r2_common/thread_arch.c b/cpu/mips32r2_common/thread_arch.c
index 4fae163d8..44c3f1c4f 100644
--- a/cpu/mips32r2_common/thread_arch.c
+++ b/cpu/mips32r2_common/thread_arch.c
@@ -182,12 +182,8 @@ mem_rw(const void *vaddr)
 extern int _dsp_save(struct dspctx *ctx);
 extern int _dsp_load(struct dspctx *ctx);
 #endif
-/*
- * The nomips16 attribute should not really be needed, it works around a toolchain
- * issue in 2016.05-03.
- */
-void __attribute__((nomips16))
-_mips_handle_exception(struct gpctx *ctx, int exception)
+
+void _mips_handle_exception(struct gpctx *ctx, int exception)
 {
     unsigned int syscall_num = 0;
 #ifdef MIPS_DSP
```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/12227#issuecomment-531964689
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190916/f2248ed7/attachment-0001.htm>


More information about the notifications mailing list