forked from wolfSSL/wolfssl
Updated README.md to include instructions for how to build on a different ARM architecture (like Raspberry Pi CortexA53). Moved the -T
into SRC_LD
so its easier to disable.
This commit is contained in:
@@ -12,7 +12,7 @@ INC = -I./Header \
|
|||||||
-I../..
|
-I../..
|
||||||
|
|
||||||
# Memory Map
|
# Memory Map
|
||||||
SRC_LD = ./linker.ld
|
SRC_LD = -T./linker.ld
|
||||||
|
|
||||||
# Defines
|
# Defines
|
||||||
DEF = -DWOLFSSL_USER_SETTINGS
|
DEF = -DWOLFSSL_USER_SETTINGS
|
||||||
@@ -85,7 +85,7 @@ $(BUILD_DIR)/%.o: %.c
|
|||||||
|
|
||||||
$(BUILD_DIR)/$(BIN).elf: $(OBJS_ASM) $(OBJS_C)
|
$(BUILD_DIR)/$(BIN).elf: $(OBJS_ASM) $(OBJS_C)
|
||||||
@echo "Linking ELF binary: $(notdir $@)"
|
@echo "Linking ELF binary: $(notdir $@)"
|
||||||
$(CMD_ECHO) $(LD) $(LDFLAGS) -T$(SRC_LD) -o $@ $^ $(LIBS)
|
$(CMD_ECHO) $(LD) $(LDFLAGS) $(SRC_LD) -o $@ $^ $(LIBS)
|
||||||
|
|
||||||
@echo "Generating name list: $(BIN).sym"
|
@echo "Generating name list: $(BIN).sym"
|
||||||
$(CMD_ECHO) $(NM) -n $@ > $(BUILD_DIR)/$(BIN).sym
|
$(CMD_ECHO) $(NM) -n $@ > $(BUILD_DIR)/$(BIN).sym
|
||||||
|
@@ -17,9 +17,22 @@ This example is for Cortex M series, but can be adopted for other architectures.
|
|||||||
* Use correct architecture 'ARCHFLAGS' (default is cortex-m0 / thumb). See [GCC ARM Options](https://gcc.gnu.org/onlinedocs/gcc-4.7.3/gcc/ARM-Options.html) `-mcpu=name`.
|
* Use correct architecture 'ARCHFLAGS' (default is cortex-m0 / thumb). See [GCC ARM Options](https://gcc.gnu.org/onlinedocs/gcc-4.7.3/gcc/ARM-Options.html) `-mcpu=name`.
|
||||||
3. Use `make` and it will build the static library and wolfCrypt test/benchmark and wolfSSL TLS client targets as `.elf` and `.hex` in `/Build`.
|
3. Use `make` and it will build the static library and wolfCrypt test/benchmark and wolfSSL TLS client targets as `.elf` and `.hex` in `/Build`.
|
||||||
|
|
||||||
Example:
|
### Building for Raspberry Pi
|
||||||
|
|
||||||
|
Example `Makefile.common` changes for Rasperry Pi with Cortex-A53:
|
||||||
|
|
||||||
|
1. Change ARCHFLAGS to `ARCHFLAGS = -mcpu=cortex-a53 -mthumb -mabi=aapcs` to specify Cortex-A53.
|
||||||
|
2. Comment out `SRC_LD`, since custom memory map is not applicable.
|
||||||
|
3. Clear `TOOLCHAIN`, so it will use default `gcc`. Set `TOOLCHAIN = `
|
||||||
|
4. Comment out `LDFLAGS += --specs=nano.specs --specs=nosys.specs` to disable newlib-nano.
|
||||||
|
|
||||||
|
Note: To comment out a line in a Makefile use place `#` in front of line.
|
||||||
|
|
||||||
|
### Example Build
|
||||||
|
|
||||||
```
|
```
|
||||||
|
make clean && make
|
||||||
|
|
||||||
text data bss dec hex filename
|
text data bss dec hex filename
|
||||||
50076 2508 44 52628 cd94 ./Build/WolfCryptTest.elf
|
50076 2508 44 52628 cd94 ./Build/WolfCryptTest.elf
|
||||||
|
|
||||||
@@ -32,6 +45,8 @@ Example:
|
|||||||
|
|
||||||
## Performace Tuning Options
|
## Performace Tuning Options
|
||||||
|
|
||||||
|
These settings are located in `Header/user_settings.h`.
|
||||||
|
|
||||||
* `DEBUG_WOLFSSL`: Undefine this to disable debug logging.
|
* `DEBUG_WOLFSSL`: Undefine this to disable debug logging.
|
||||||
* `NO_ERROR_STRINGS`: Disables error strings to save code space.
|
* `NO_ERROR_STRINGS`: Disables error strings to save code space.
|
||||||
* `NO_INLINE`: Disabling inline function saves about 1KB, but is slower.
|
* `NO_INLINE`: Disabling inline function saves about 1KB, but is slower.
|
||||||
|
Reference in New Issue
Block a user