Skip to content

Commit

Permalink
Fix Makefile, remove martos library linking
Browse files Browse the repository at this point in the history
  • Loading branch information
Artem-Nesterenko2005 committed Oct 28, 2024
1 parent 53334d9 commit 378fcda
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 1 addition & 3 deletions examples/c-examples/xtensa-esp32/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ LD = $(TOOLCHAIN)ld
OC = $(TOOLCHAIN)objcopy
OS = $(TOOLCHAIN)size

# Linker script location.
LDSCRIPT = ./ld/esp32.ld
# Set C/LD/AS flags.
CFLAGS += $(INC) -Wall -Werror -std=gnu11 -nostdlib $(CFLAGS_PLATFORM) $(COPT)
# (Allow access to the same memory location w/ different data widths.)
Expand All @@ -24,7 +22,7 @@ CFLAGS += -fdata-sections -ffunction-sections
CFLAGS += -Os -g
# Link with martos
LDFLAGS += -L../../../c-library/xtensa-esp32/target/xtensa-esp32-none-elf/release/ -lxtensa_esp32_static_lib
LDFLAGS += -nostdlib -T$(LDSCRIPT) -Wl,-Map=$@.map -Wl,--cref -Wl,--gc-sections
LDFLAGS += -nostdlib -Wl,-Map=$@.map -Wl,--cref -Wl,--gc-sections
LDFLAGS += $(LDFLAGS_PLATFORM)
LDFLAGS += -lm -lc -lgcc -Wl,--allow-multiple-definition
ASFLAGS += -c -O0 -Wall -fmessage-length=0
Expand Down
3 changes: 2 additions & 1 deletion examples/c-examples/xtensa-esp32/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
#include <stdbool.h>

extern unsigned int _sbss, _ebss, _sidata, _sdata, _edata;

extern void add_task(void (*setup_fn)(), void (*loop_fn)(), bool (*stop_condition_fn)());
extern void start_task_manager();
extern void init_system();

int counter = 0;

Expand All @@ -24,6 +24,7 @@ bool stop_condition_fn() {
}

int main( void ) {
init_system();
add_task(setup_fn, loop_fn, stop_condition_fn);
start_task_manager();

Expand Down

0 comments on commit 378fcda

Please sign in to comment.