Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

litex: Enable -Werror=missing-prototypes #5580

Merged
merged 1 commit into from
Nov 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ports/litex/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ endif
# option to override compiler optimization level, set in boards/$(BOARD)/mpconfigboard.mk
CFLAGS += $(OPTIMIZATION_FLAGS)

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

# TODO: check this
CFLAGS += -D__START=main -DFOMU
Expand Down
1 change: 1 addition & 0 deletions ports/litex/background.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include "supervisor/filesystem.h"
#include "supervisor/usb.h"
#include "supervisor/shared/stack.h"
#include "supervisor/port.h"

void port_background_task(void) {
}
Expand Down
1 change: 1 addition & 0 deletions ports/litex/common-hal/microcontroller/Processor.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include "py/runtime.h"

#include "common-hal/microcontroller/Processor.h"
#include "shared-bindings/microcontroller/Processor.h"
#include "shared-bindings/microcontroller/ResetReason.h"
#include "supervisor/shared/translate.h"

Expand Down
4 changes: 3 additions & 1 deletion ports/litex/common-hal/os/__init__.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
#include "py/objtuple.h"
#include "py/qstr.h"

#include "shared-bindings/os/__init__.h"

STATIC const qstr os_uname_info_fields[] = {
MP_QSTR_sysname, MP_QSTR_nodename,
MP_QSTR_release, MP_QSTR_version, MP_QSTR_machine
Expand All @@ -56,6 +58,6 @@ mp_obj_t common_hal_os_uname(void) {
return (mp_obj_t)&os_uname_info_obj;
}

bool common_hal_os_urandom(uint8_t *buffer, uint32_t length) {
bool common_hal_os_urandom(uint8_t *buffer, mp_uint_t length) {
return false;
}
2 changes: 2 additions & 0 deletions ports/litex/mphalport.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include "py/mphal.h"
#include "py/mpstate.h"
#include "py/gc.h"
#include "supervisor/cpu.h"
#include "supervisor/usb.h"

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

void isr(void);
__attribute__((section(".ramtext")))
void isr(void) {
uint8_t irqs = irq_pending() & irq_getmask();
Expand Down
1 change: 1 addition & 0 deletions ports/litex/supervisor/port.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
// crystals.
volatile uint64_t raw_ticks = 0;
volatile int subsecond = 0;
void SysTick_Handler(void);
__attribute__((section(".ramtext")))
void SysTick_Handler(void) {
timer0_ev_pending_write(1);
Expand Down