Skip to content

Commit ac97896

Browse files
committed
litex: Enable -Werror=missing-prototypes
1 parent b9ecb0f commit ac97896

File tree

6 files changed

+9
-2
lines changed

6 files changed

+9
-2
lines changed

ports/litex/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ endif
8888
# option to override compiler optimization level, set in boards/$(BOARD)/mpconfigboard.mk
8989
CFLAGS += $(OPTIMIZATION_FLAGS)
9090

91-
CFLAGS += $(INC) -Werror -Wall -std=gnu11 -nostdlib -fshort-enums $(BASE_CFLAGS) $(C_DEFS) $(CFLAGS_MOD) $(COPT)
91+
CFLAGS += $(INC) -Werror -Wall -std=gnu11 -nostdlib -fshort-enums $(BASE_CFLAGS) $(C_DEFS) $(CFLAGS_MOD) $(COPT) -Werror=missing-prototypes
9292

9393
# TODO: check this
9494
CFLAGS += -D__START=main -DFOMU

ports/litex/background.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#include "supervisor/filesystem.h"
2929
#include "supervisor/usb.h"
3030
#include "supervisor/shared/stack.h"
31+
#include "supervisor/port.h"
3132

3233
void port_background_task(void) {
3334
}

ports/litex/common-hal/microcontroller/Processor.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
#include "py/runtime.h"
3030

3131
#include "common-hal/microcontroller/Processor.h"
32+
#include "shared-bindings/microcontroller/Processor.h"
3233
#include "shared-bindings/microcontroller/ResetReason.h"
3334
#include "supervisor/shared/translate.h"
3435

ports/litex/common-hal/os/__init__.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030
#include "py/objtuple.h"
3131
#include "py/qstr.h"
3232

33+
#include "shared-bindings/os/__init__.h"
34+
3335
STATIC const qstr os_uname_info_fields[] = {
3436
MP_QSTR_sysname, MP_QSTR_nodename,
3537
MP_QSTR_release, MP_QSTR_version, MP_QSTR_machine
@@ -56,6 +58,6 @@ mp_obj_t common_hal_os_uname(void) {
5658
return (mp_obj_t)&os_uname_info_obj;
5759
}
5860

59-
bool common_hal_os_urandom(uint8_t *buffer, uint32_t length) {
61+
bool common_hal_os_urandom(uint8_t *buffer, mp_uint_t length) {
6062
return false;
6163
}

ports/litex/mphalport.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
#include "py/mphal.h"
3232
#include "py/mpstate.h"
3333
#include "py/gc.h"
34+
#include "supervisor/cpu.h"
3435
#include "supervisor/usb.h"
3536

3637
#include "csr.h"
@@ -54,6 +55,7 @@ extern void SysTick_Handler(void);
5455
// be prematurely enabled by interrupt handlers that enable and disable interrupts.
5556
extern volatile uint32_t nesting_count;
5657

58+
void isr(void);
5759
__attribute__((section(".ramtext")))
5860
void isr(void) {
5961
uint8_t irqs = irq_pending() & irq_getmask();

ports/litex/supervisor/port.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
// crystals.
3939
volatile uint64_t raw_ticks = 0;
4040
volatile int subsecond = 0;
41+
void SysTick_Handler(void);
4142
__attribute__((section(".ramtext")))
4243
void SysTick_Handler(void) {
4344
timer0_ev_pending_write(1);

0 commit comments

Comments
 (0)