Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mongoose
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
esp
mongoose
Commits
807e4ea6
Commit
807e4ea6
authored
8 years ago
by
Alexander Alashkin
Committed by
Cesanta Bot
8 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix STM32F4_CC3100 Mongoose example compilation
PUBLISHED_FROM=7a67a67d2f0007e241e4ccb57bc24a43ba20bfde
parent
507e8bfa
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
26 deletions
+24
-26
Makefile
examples/STM32F4_CC3100/Makefile
+2
-3
Makefile.build
examples/STM32F4_CC3100/Makefile.build
+22
-23
No files found.
examples/STM32F4_CC3100/Makefile
View file @
807e4ea6
SDK
?=
$(
shell
cat
sdk.version
)
SRC_DIR
?=
$
(
realpath
../..
/..
)
SRC_DIR
?=
$
(
realpath
../..
)
.PHONY
:
all clean
...
...
@@ -8,6 +8,5 @@ MAKEFLAGS += w
all clean
:
docker run
--rm
-i
-v
$(SRC_DIR)
:/src
$(SDK)
\
/bin/bash
-c
"
\
make -C /src/mongoose mongoose.c mongoose.h &&
\
make -C /src/mongoose/examples/STM32F4_CC3100 -f Makefile.build
$@
-
$(MAKEFLAGS)
\
make -C /src/examples/STM32F4_CC3100 -f Makefile.build
$@
-
$(MAKEFLAGS)
\
"
This diff is collapsed.
Click to expand it.
examples/STM32F4_CC3100/Makefile.build
View file @
807e4ea6
...
...
@@ -11,9 +11,9 @@ STM32F4_SRCS = stm32f4xx_hal_spi.c stm32f4xx_hal_gpio.c stm32f4xx_hal_cortex.c\
stm32f4xx_hal_uart.c stm32f4xx_hal_tim.c
\
stm32f4xx_hal_tim_ex.c stm32f4xx_hal_rtc_ex.c stm32f4xx_hal_rtc.c
SRCS
=
main.c mongoose.c startup_utils.c
${
CC3100_DRV_SRCS
}
${
CC3100_PLATFORM_SRCS
}
${
STM32F4_SRCS
}
SRCS
=
main.c mongoose.c startup_utils.c
${
CC3100_DRV_SRCS
}
${
CC3100_PLATFORM_SRCS
}
${
STM32F4_SRCS
}
REPO_ROOT
=
./../../
../
REPO_ROOT
=
./../../
CC3100_SDKROOT
=
/opt/CC3100SDK_1.2.0/cc3100-sdk
STM32CUBEF4_ROOT
=
/opt/STM32CubeF4
STM32CUBEF4_DRV_PATH
=
${
STM32CUBEF4_ROOT
}
/Drivers
...
...
@@ -22,7 +22,7 @@ CC = arm-none-eabi-gcc
OBJCOPY
=
arm-none-eabi-objcopy
FP_FLAGS
=
-mfloat-abi
=
hard
-mfpu
=
fpv4-sp-d16
ARCH_FLAGS
=
-mthumb
-mcpu
=
cortex-m4
ARCH_FLAGS
=
-mthumb
-mcpu
=
cortex-m4
BUILD_DIR
=
.build
OUT_DIR
=
out
...
...
@@ -36,21 +36,20 @@ OBJS = $(addprefix $(BUILD_DIR)/,$(patsubst %.c,%.o,$(SRCS)) $(patsubst %.s,%.o,
VPATH
=
${
CC3100_SDKROOT
}
/simplelink/source
\
${
CC3100_SDKROOT
}
/platform/stm32discovery
\
${
STM32CUBEF4_ROOT
}
/Drivers/STM32F4xx_HAL_Driver/Src
\
${
STM32CUBEF4_ROOT
}
/Drivers/BSP/STM32F4-Discovery
\
${
REPO_ROOT
}
/mongoose
${
STM32CUBEF4_ROOT
}
/Drivers/STM32F4xx_HAL_Driver/Src
\
${
STM32CUBEF4_ROOT
}
/Drivers/BSP/STM32F4-Discovery
\
${
REPO_ROOT
}
# CC3100 SDK and STM32 SDK include headers w/out path, just like
# #include "simplelink.h". As result, we have to add all required directories
# into IPATH
IPATH
=
.
\
${
CC3100_SDKROOT
}
/simplelink/include
\
${
CC3100_SDKROOT
}
/platform/stm32discovery
\
${
STM32CUBEF4_DRV_PATH
}
/BSP/STM32F4-Discovery
\
${
STM32CUBEF4_DRV_PATH
}
/STM32F4xx_HAL_Driver/Inc
\
${
STM32CUBEF4_DRV_PATH
}
/CMSIS/Include
\
${
STM32CUBEF4_DRV_PATH
}
/CMSIS/Device/ST/STM32F4xx/Include
IPATH
=
.
${
CC3100_SDKROOT
}
/simplelink/include
\
${
CC3100_SDKROOT
}
/platform/stm32discovery
\
${
STM32CUBEF4_DRV_PATH
}
/BSP/STM32F4-Discovery
\
${
STM32CUBEF4_DRV_PATH
}
/STM32F4xx_HAL_Driver/Inc
\
${
STM32CUBEF4_DRV_PATH
}
/CMSIS/Include
\
${
STM32CUBEF4_DRV_PATH
}
/CMSIS/Device/ST/STM32F4xx/Include
LDFLAGS
=
--static
-nostartfiles
LDLIBS
=
-Wl
,--start-group
-lc
-lgcc
-lnosys
-Wl
,--end-group
...
...
@@ -59,13 +58,13 @@ LDSCRIPT = stm32f429xx.ld
INCDIRS
=
$
(
addprefix
-I
,
$(IPATH)
)
CFLAGS
=
${
FP_FLAGS
}
${
ARCH_FLAGS
}
${
INCDIRS
}
\
-D
${
BOARD
}
-DEXT_LIB_REGISTERED_GENERAL_EVENTS
\
-DSL_FULL
\
-DCS_PLATFORM
=
6
\
-D__STM32F407xx_H
\
-DMG_SIMPLELINK_NO_OSI
\
-DMG_ENABLE_MQTT
\
-g
-fno-common
-ffunction-sections
-fdata-sections
\
-D
${
BOARD
}
-DEXT_LIB_REGISTERED_GENERAL_EVENTS
\
-DSL_FULL
\
-DCS_PLATFORM
=
6
\
-D__STM32F407xx_H
\
-DMG_SIMPLELINK_NO_OSI
\
-DMG_ENABLE_MQTT
\
-g
-fno-common
-ffunction-sections
-fdata-sections
\
ELF
=
${
BUILD_DIR
}
/
${
PROJECT
}
.elf
BIN
=
${
OUT_DIR
}
/
${
PROJECT
}
.bin
...
...
@@ -79,15 +78,15 @@ ${OUT_DIR}:
mkdir
-p
$@
$(BUILD_DIR)/%.o
:
%.c
$(CC)
${
CFLAGS
}
$^
-c
-o
$@
$(CC)
${
CFLAGS
}
$^
-c
-o
$@
$(BUILD_DIR)/%.o
:
%.s
$(CC)
${
CFLAGS
}
$^
-c
-o
$@
$(CC)
${
CFLAGS
}
$^
-c
-o
$@
${ELF}
:
${OBJS}
$(CC)
${
ARCH_FLAGS
}
${
FP_FLAGS
}
$(LDFLAGS)
$(OBJS)
$(LDLIBS)
-T
$(LDSCRIPT)
-o
$@
${BIN}
:
${ELF}
${BIN}
:
${ELF}
$(OBJCOPY)
-Obinary
$^
$@
clean
:
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment