mirror of
https://github.com/cesanta/mongoose.git
synced 2025-07-31 18:06:14 +08:00
Get rid of Docker (TI), part 1
This commit is contained in:
parent
e4566518b2
commit
f4d16f1c47
@ -1,8 +1,5 @@
|
|||||||
TARGET = firmware
|
TARGET = firmware
|
||||||
ROOT ?= $(realpath $(CURDIR)/../../..)
|
ROOT ?= $(realpath $(CURDIR)/../../..)
|
||||||
D ?= docker
|
|
||||||
DOCKER ?= $(D) run --rm -v $(ROOT):$(ROOT) -w $(CURDIR) mdashnet/armgcc
|
|
||||||
CROSS ?= arm-none-eabi
|
|
||||||
CFLAGS ?= -W -Wall -Wextra -Werror -Wundef -Wshadow -Wdouble-promotion \
|
CFLAGS ?= -W -Wall -Wextra -Werror -Wundef -Wshadow -Wdouble-promotion \
|
||||||
-Wformat-truncation -fno-common -Wconversion \
|
-Wformat-truncation -fno-common -Wconversion \
|
||||||
-g3 -Os -ffunction-sections -fdata-sections -I. -I$(ROOT) \
|
-g3 -Os -ffunction-sections -fdata-sections -I. -I$(ROOT) \
|
||||||
@ -18,21 +15,10 @@ SOURCES = boot.c main.c syscalls.c \
|
|||||||
all build example: $(TARGET).bin
|
all build example: $(TARGET).bin
|
||||||
|
|
||||||
$(TARGET).bin: $(TARGET).elf
|
$(TARGET).bin: $(TARGET).elf
|
||||||
$(DOCKER) $(CROSS)-objcopy -O binary $< $@
|
arm-none-eabi-objcopy -O binary $< $@
|
||||||
|
|
||||||
$(TARGET).elf: $(SOURCES) mcu.h
|
$(TARGET).elf: $(SOURCES) mcu.h
|
||||||
$(DOCKER) $(CROSS)-gcc $(SOURCES) $(CFLAGS) $(LDFLAGS) -o $@
|
arm-none-eabi-gcc $(SOURCES) $(CFLAGS) $(LDFLAGS) -o $@
|
||||||
|
|
||||||
# Build on Windows. Download Win32 Zip from ARM GCC downloads, unzip to c:\armgcc
|
|
||||||
ARMGCC ?= c:/armgcc
|
|
||||||
windows: $(TARGET).bin
|
|
||||||
windows: CROSS = $(ARMGCC)/bin/arm-none-eabi
|
|
||||||
windows: DOCKER =
|
|
||||||
|
|
||||||
# Show top 10 stack-hungry functions
|
|
||||||
su: CFLAGS += -fstack-usage
|
|
||||||
su: $(TARGET).elf
|
|
||||||
cat *.su | sort -rnk2 | head -10
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
@rm -rf $(TARGET).* *.su
|
@rm -rf $(TARGET).* *.su
|
||||||
|
@ -22,9 +22,7 @@ which implements the following:
|
|||||||
- [ARM GCC](http://mongoose.ws/tutorials/tools/#arm-gcc)
|
- [ARM GCC](http://mongoose.ws/tutorials/tools/#arm-gcc)
|
||||||
- [Uniflash](https://mongoose.ws/tutorials/ti/ek-tm4c1294xl-baremetal/#build-and-run) for flashing
|
- [Uniflash](https://mongoose.ws/tutorials/ti/ek-tm4c1294xl-baremetal/#build-and-run) for flashing
|
||||||
|
|
||||||
The Makefile defaults to using Docker for the compiler, so you don't actually need to install it if you are using a Linux/Mac workstation. If you are not, or you want to run your local ARM compiler, just append `DOCKER=` to the make commands depicted below to call the compiler directly; it must be in your executable path.
|
The links above will send you to tutorials on how to install each of those tools in your workstation for Linux, Mac, and Windows.
|
||||||
|
|
||||||
In any case, the links above will send you to tutorials on how to install each of those tools in your workstation for Linux, Mac, and Windows.
|
|
||||||
|
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
@ -16,9 +16,7 @@ It implements the following:
|
|||||||
- [ARM GCC](http://mongoose.ws/tutorials/tools/#arm-gcc)
|
- [ARM GCC](http://mongoose.ws/tutorials/tools/#arm-gcc)
|
||||||
- [Uniflash](https://mongoose.ws/tutorials/ti/ek-tm4c1294xl-baremetal/#build-and-run) for flashing
|
- [Uniflash](https://mongoose.ws/tutorials/ti/ek-tm4c1294xl-baremetal/#build-and-run) for flashing
|
||||||
|
|
||||||
The Makefile defaults to using Docker for the compiler, so you don't actually need to install it if you are using a Linux/Mac workstation. If you are not, or you want to run your local ARM compiler, just append `DOCKER=` to the make commands depicted below to call the compiler directly; it must be in your executable path.
|
The links above will send you to tutorials on how to install each of those tools in your workstation for Linux, Mac, and Windows.
|
||||||
|
|
||||||
In any case, the links above will send you to tutorials on how to install each of those tools in your workstation for Linux, Mac, and Windows.
|
|
||||||
|
|
||||||
You'll also need _git_ so the Makefile can clone the FreeRTOS-Kernel repository. We assume you have it since you got to get this repository somehow. If you don't, and don't want to install it, just get the proper [FreeRTOS-Kernel](https://github.com/FreeRTOS/FreeRTOS-Kernel) version (see the Makefile) from its repository, as you did with the Mongoose repository.
|
You'll also need _git_ so the Makefile can clone the FreeRTOS-Kernel repository. We assume you have it since you got to get this repository somehow. If you don't, and don't want to install it, just get the proper [FreeRTOS-Kernel](https://github.com/FreeRTOS/FreeRTOS-Kernel) version (see the Makefile) from its repository, as you did with the Mongoose repository.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user