minimal/Makefile: Change C standard from gnu99 to c99.

This commit is contained in:
Damien George 2017-03-23 15:41:38 +11:00
parent 4afa782fb4
commit 92cd000842
2 changed files with 3 additions and 3 deletions

View File

@ -22,9 +22,9 @@ ifeq ($(CROSS), 1)
DFU = ../tools/dfu.py
PYDFU = ../tools/pydfu.py
CFLAGS_CORTEX_M4 = -mthumb -mtune=cortex-m4 -mabi=aapcs-linux -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -fsingle-precision-constant -Wdouble-promotion
CFLAGS = $(INC) -Wall -Werror -std=gnu99 -nostdlib $(CFLAGS_CORTEX_M4) $(COPT)
CFLAGS = $(INC) -Wall -Werror -std=c99 -nostdlib $(CFLAGS_CORTEX_M4) $(COPT)
else
CFLAGS = -m32 $(INC) -Wall -Werror -std=gnu99 $(COPT)
CFLAGS = -m32 $(INC) -Wall -Werror -std=c99 $(COPT)
endif
#Debugging/Optimization

View File

@ -106,7 +106,7 @@ extern uint32_t _estack, _sidata, _sdata, _edata, _sbss, _ebss;
void Reset_Handler(void) __attribute__((naked));
void Reset_Handler(void) {
// set stack pointer
asm volatile ("ldr sp, =_estack");
__asm volatile ("ldr sp, =_estack");
// copy .data section from flash to RAM
for (uint32_t *src = &_sidata, *dest = &_sdata; dest < &_edata;) {
*dest++ = *src++;