Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ typedef enum {
PF_0, PF_1, PF_2, PF_3, PF_4, PF_5, PF_6, PF_7, PF_8, PF_9, PF_10, PF_11, PF_12, PF_13, PF_14, PF_15,
PH_0, PH_1, PH_2, PH_3, PH_4, PH_5, PH_6, PH_7, PH_8, PH_9, PH_10, PH_11,

LED1 = PD_13,
LED2 = PD_12,
LED3 = PD_13,
LED4 = PD_12,
LED5 = PD_14,
Expand Down
3 changes: 3 additions & 0 deletions libraries/rtos/rtx/RTX_CM_lib.h
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,9 @@ osThreadDef_t os_thread_def_main = {(os_pthread)main, osPriorityNormal, 0, NULL}
#elif defined(TARGET_STM32F100RB) || defined(TARGET_STM32F051R8)
#define INITIAL_SP (0x20002000UL)

#elif defined(TARGET_STM32F407)
#define INITIAL_SP (0x20020000UL)

#else
#error "no target defined"

Expand Down
7 changes: 5 additions & 2 deletions libraries/rtos/rtx/RTX_Conf_CM.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
// counting "main", but not counting "osTimerThread"
// <i> Default: 6
#ifndef OS_TASKCNT
# if defined(TARGET_LPC1768) || defined(TARGET_LPC2368) || defined(TARGET_LPC4088) || defined(TARGET_LPC1347) || defined(TARGET_KL46Z)
# if defined(TARGET_LPC1768) || defined(TARGET_LPC2368) || defined(TARGET_LPC4088) || defined(TARGET_LPC1347) || defined(TARGET_KL46Z) || defined(TARGET_STM32F407)
# define OS_TASKCNT 14
# elif defined(TARGET_LPC11U24) || defined(TARGET_LPC11U35_401) || defined(TARGET_LPC11U35_501) || defined(TARGET_LPC1114) || defined(TARGET_LPC812) || defined(TARGET_KL25Z) || defined(TARGET_STM32F100RB) || defined(TARGET_STM32F051R8)
# define OS_TASKCNT 6
Expand All @@ -60,7 +60,7 @@

// <o>Scheduler (+ interrupts) stack size [bytes] <64-4096:8><#/4>
#ifndef OS_SCHEDULERSTKSIZE
# if defined(TARGET_LPC1768) || defined(TARGET_LPC2368) || defined(TARGET_LPC4088) || defined(TARGET_LPC1347) || defined(TARGET_KL46Z)
# if defined(TARGET_LPC1768) || defined(TARGET_LPC2368) || defined(TARGET_LPC4088) || defined(TARGET_LPC1347) || defined(TARGET_KL46Z) || defined(TARGET_STM32F407)
# define OS_SCHEDULERSTKSIZE 256
# elif defined(TARGET_LPC11U24) || defined(TARGET_LPC11U35_401) || defined(TARGET_LPC11U35_501) || defined(TARGET_LPC1114) || defined(TARGET_LPC812) || defined(TARGET_KL25Z) || defined(TARGET_STM32F100RB) || defined(TARGET_STM32F051R8)
# define OS_SCHEDULERSTKSIZE 128
Expand Down Expand Up @@ -123,6 +123,9 @@
# elif defined(TARGET_LPC4088)
# define OS_CLOCK 120000000

# elif defined(TARGET_STM32F407)
# define OS_CLOCK 168000000

# else
# error "no target defined"
# endif
Expand Down
4 changes: 0 additions & 4 deletions libraries/tests/mbed/ticker/main.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
#include "mbed.h"

#if defined(TARGET_STM32F407)
#define LED1 LED3
#endif

void print_char(char c = '*')
{
printf("%c", c);
Expand Down
2 changes: 1 addition & 1 deletion workspace_tools/export/gcc_arm_lpc4088.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ CPP = $(GCC_BIN)arm-none-eabi-g++
LD = $(GCC_BIN)arm-none-eabi-gcc
OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy

CPU = -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard
CPU = -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=softfp
CC_FLAGS = $(CPU) -c -Os -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections
CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %}

Expand Down
4 changes: 2 additions & 2 deletions workspace_tools/export/gcc_arm_stm32f407.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy
OBJDUMP = $(GCC_BIN)arm-none-eabi-objdump
SIZE = $(GCC_BIN)arm-none-eabi-size

CPU = -mcpu=cortex-m4 -mthumb
CPU = -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=softfp
CC_FLAGS = $(CPU) -c -Os -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections
CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %}

LD_FLAGS = -mcpu=cortex-m3 -mthumb -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float
LD_FLAGS = -mcpu=cortex-m4 -mthumb -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float
LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref
LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys

Expand Down
2 changes: 1 addition & 1 deletion workspace_tools/toolchains/gcc.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def __init__(self, target, options=None, notify=None, macros=None, tool_path="")

if target.core == "Cortex-M4F":
self.cpu.append("-mfpu=fpv4-sp-d16")
self.cpu.append("-mfloat-abi=hard")
self.cpu.append("-mfloat-abi=softfp")

# Note: We are using "-O2" instead of "-Os" to avoid this known GCC bug:
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46762
Expand Down