nuttx/boards/risc-v/bl602/bl602evb/scripts/Make.defs

86 lines
3.3 KiB
Plaintext
Raw Normal View History

############################################################################
# boards/risc-v/bl602/bl602evb/scripts/Make.defs
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership. The
# ASF licenses this file to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance with the
# License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
############################################################################
include $(TOPDIR)/.config
include $(TOPDIR)/tools/Config.mk
include $(TOPDIR)/arch/risc-v/src/rv32im/Toolchain.defs
ARCH_SRCDIR = $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src
ARCH_INCDIR = $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)include
LDSCRIPT = ld.script
ifeq ($(CONFIG_CYGWIN_WINTOOL),y)
ARCHSCRIPT = -T "${shell cygpath -w $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT)}"
else
ARCHSCRIPT = -T$(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT)
endif
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
ARCHOPTIMIZATION = -g
ASARCHCPUFLAGS += -Wa,-g
endif
MAXOPTIMIZATION = -Os
ifneq ($(CONFIG_DEBUG_NOOPT),y)
risc-v/bl602: Add wifi and ble support tcpip ok update wifi demo configuration fix tcpip input cause misalign fault change some api definetions in nuttx fix wifi manager strlen copy without suffix null character fix 602 network buf allocation issue wifi scan works [ble] Add controller code [BLE] Add nuttx adapt code for blecontroller . [BLE] modified include file path, to fix cflag is too long. [ble]Test ble peripheral pass, save code. [ble] Organize the code [BLE] Add blecontroller config for nuttx [BLE] Add config for ble example fix tcp lost packet when rx support wpa3. Copy default config from wifi default config. Create ble for local test and ble tester for autopts. Add config for local test. Add pts teset config for host test Add config for mesh test Create task to init blecontroller Delete blecontroller rx thread. using idle task to receive hci command from host Set ble device name to /dev/ble, and fix code. 1.fix a ke schedule risk 2. CFG_HOST is enabled only in the case that CONFIG_BLE_HOST_DISABLE is not enabled, by lanlan rm _sp_main stack. change h/l workq_stack_size 6K change l workq_stack_size 3K. [ble] delete file_detach color idle stack. clear bl602 netdev code SCAN is sorted according to RSSI enlarge nsh command line buffer fixup stack overflow check checkfail when startup arch/risc-v/BL602:fix reboot cause crash reboot default use romapi. riscv/bl602:netdev support defered input, remove wifi_tx function risc-v/bl602:fix sem_timedwait usage error in bl_cmds risc-v/bl602:fix memory access out of bounds when copy ssid remove ble and wifi source, download when build add bl602 blob gitignore risc-v/bl602:remove ble-pts defconfig Fix some typos in NuttX style naming Fix the replacement of tab to space fix wlan interface down still receive packet fix wapi crash, rx when ifdown,and ble_hci_rx_do change system reset to rom dirver change ble hci interval to 50ms NuttX support wifi enable/disable log via KConfig support country code configuration in Kconfig fix ap tx not work
2020-12-22 09:42:04 +01:00
ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -fno-strength-reduce
endif
risc-v/bl602: Add wifi and ble support tcpip ok update wifi demo configuration fix tcpip input cause misalign fault change some api definetions in nuttx fix wifi manager strlen copy without suffix null character fix 602 network buf allocation issue wifi scan works [ble] Add controller code [BLE] Add nuttx adapt code for blecontroller . [BLE] modified include file path, to fix cflag is too long. [ble]Test ble peripheral pass, save code. [ble] Organize the code [BLE] Add blecontroller config for nuttx [BLE] Add config for ble example fix tcp lost packet when rx support wpa3. Copy default config from wifi default config. Create ble for local test and ble tester for autopts. Add config for local test. Add pts teset config for host test Add config for mesh test Create task to init blecontroller Delete blecontroller rx thread. using idle task to receive hci command from host Set ble device name to /dev/ble, and fix code. 1.fix a ke schedule risk 2. CFG_HOST is enabled only in the case that CONFIG_BLE_HOST_DISABLE is not enabled, by lanlan rm _sp_main stack. change h/l workq_stack_size 6K change l workq_stack_size 3K. [ble] delete file_detach color idle stack. clear bl602 netdev code SCAN is sorted according to RSSI enlarge nsh command line buffer fixup stack overflow check checkfail when startup arch/risc-v/BL602:fix reboot cause crash reboot default use romapi. riscv/bl602:netdev support defered input, remove wifi_tx function risc-v/bl602:fix sem_timedwait usage error in bl_cmds risc-v/bl602:fix memory access out of bounds when copy ssid remove ble and wifi source, download when build add bl602 blob gitignore risc-v/bl602:remove ble-pts defconfig Fix some typos in NuttX style naming Fix the replacement of tab to space fix wlan interface down still receive packet fix wapi crash, rx when ifdown,and ble_hci_rx_do change system reset to rom dirver change ble hci interval to 50ms NuttX support wifi enable/disable log via KConfig support country code configuration in Kconfig fix ap tx not work
2020-12-22 09:42:04 +01:00
ARCHCPUFLAGS = -march=rv32imafc -mabi=ilp32f -mno-relax
ARCHCFLAGS = -fno-builtin -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -fshort-enums -fno-omit-frame-pointer
ARCHCXXFLAGS = -fno-builtin -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -fshort-enums -fno-omit-frame-pointer -fno-exceptions -fcheck-new -std=c++17 -D__NuttX__ -pipe -nostdinc++
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef
ARCHWARNINGSXX = -Wall -Wshadow -Wundef
ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10
risc-v/bl602: Add wifi and ble support tcpip ok update wifi demo configuration fix tcpip input cause misalign fault change some api definetions in nuttx fix wifi manager strlen copy without suffix null character fix 602 network buf allocation issue wifi scan works [ble] Add controller code [BLE] Add nuttx adapt code for blecontroller . [BLE] modified include file path, to fix cflag is too long. [ble]Test ble peripheral pass, save code. [ble] Organize the code [BLE] Add blecontroller config for nuttx [BLE] Add config for ble example fix tcp lost packet when rx support wpa3. Copy default config from wifi default config. Create ble for local test and ble tester for autopts. Add config for local test. Add pts teset config for host test Add config for mesh test Create task to init blecontroller Delete blecontroller rx thread. using idle task to receive hci command from host Set ble device name to /dev/ble, and fix code. 1.fix a ke schedule risk 2. CFG_HOST is enabled only in the case that CONFIG_BLE_HOST_DISABLE is not enabled, by lanlan rm _sp_main stack. change h/l workq_stack_size 6K change l workq_stack_size 3K. [ble] delete file_detach color idle stack. clear bl602 netdev code SCAN is sorted according to RSSI enlarge nsh command line buffer fixup stack overflow check checkfail when startup arch/risc-v/BL602:fix reboot cause crash reboot default use romapi. riscv/bl602:netdev support defered input, remove wifi_tx function risc-v/bl602:fix sem_timedwait usage error in bl_cmds risc-v/bl602:fix memory access out of bounds when copy ssid remove ble and wifi source, download when build add bl602 blob gitignore risc-v/bl602:remove ble-pts defconfig Fix some typos in NuttX style naming Fix the replacement of tab to space fix wlan interface down still receive packet fix wapi crash, rx when ifdown,and ble_hci_rx_do change system reset to rom dirver change ble hci interval to 50ms NuttX support wifi enable/disable log via KConfig support country code configuration in Kconfig fix ap tx not work
2020-12-22 09:42:04 +01:00
ifeq ($(CONFIG_STACK_OVERFLOW_CHECK),y)
ARCHCFLAGS += -finstrument-functions -ffixed-s11
endif
ARCHDEFINES += -DARCH_RISCV
CFLAGS = $(ARCHCFLAGS) $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS) -pipe
CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS)
risc-v/bl602: Add wifi and ble support tcpip ok update wifi demo configuration fix tcpip input cause misalign fault change some api definetions in nuttx fix wifi manager strlen copy without suffix null character fix 602 network buf allocation issue wifi scan works [ble] Add controller code [BLE] Add nuttx adapt code for blecontroller . [BLE] modified include file path, to fix cflag is too long. [ble]Test ble peripheral pass, save code. [ble] Organize the code [BLE] Add blecontroller config for nuttx [BLE] Add config for ble example fix tcp lost packet when rx support wpa3. Copy default config from wifi default config. Create ble for local test and ble tester for autopts. Add config for local test. Add pts teset config for host test Add config for mesh test Create task to init blecontroller Delete blecontroller rx thread. using idle task to receive hci command from host Set ble device name to /dev/ble, and fix code. 1.fix a ke schedule risk 2. CFG_HOST is enabled only in the case that CONFIG_BLE_HOST_DISABLE is not enabled, by lanlan rm _sp_main stack. change h/l workq_stack_size 6K change l workq_stack_size 3K. [ble] delete file_detach color idle stack. clear bl602 netdev code SCAN is sorted according to RSSI enlarge nsh command line buffer fixup stack overflow check checkfail when startup arch/risc-v/BL602:fix reboot cause crash reboot default use romapi. riscv/bl602:netdev support defered input, remove wifi_tx function risc-v/bl602:fix sem_timedwait usage error in bl_cmds risc-v/bl602:fix memory access out of bounds when copy ssid remove ble and wifi source, download when build add bl602 blob gitignore risc-v/bl602:remove ble-pts defconfig Fix some typos in NuttX style naming Fix the replacement of tab to space fix wlan interface down still receive packet fix wapi crash, rx when ifdown,and ble_hci_rx_do change system reset to rom dirver change ble hci interval to 50ms NuttX support wifi enable/disable log via KConfig support country code configuration in Kconfig fix ap tx not work
2020-12-22 09:42:04 +01:00
CXXFLAGS := $(ARCHCXXFLAGS) $(ARCHWARNINGSXX) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS)
CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS)
CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS)
AFLAGS += $(CFLAGS) -D__ASSEMBLY__ $(ASARCHCPUFLAGS)
NXFLATLDFLAGS1 = -r -d -warn-common
NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) -T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat-pcrel.ld -no-check-sections
LDNXFLATFLAGS = -e main -s 2048
# ELF module definitions
CELFFLAGS = $(CFLAGS) -fno-common
CXXELFFLAGS = $(CXXFLAGS) -fno-common
LDELFFLAGS = -melf32lriscv -r -e main
ifeq ($(CONFIG_CYGWIN_WINTOOL),y)
LDELFFLAGS += -T "${shell cygpath -w $(BOARD_DIR)$(DELIM)scripts$(DELIM)gnu-elf.ld}"
else
LDELFFLAGS += -T $(BOARD_DIR)$(DELIM)scripts$(DELIM)gnu-elf.ld
endif
risc-v/bl602: Add wifi and ble support tcpip ok update wifi demo configuration fix tcpip input cause misalign fault change some api definetions in nuttx fix wifi manager strlen copy without suffix null character fix 602 network buf allocation issue wifi scan works [ble] Add controller code [BLE] Add nuttx adapt code for blecontroller . [BLE] modified include file path, to fix cflag is too long. [ble]Test ble peripheral pass, save code. [ble] Organize the code [BLE] Add blecontroller config for nuttx [BLE] Add config for ble example fix tcp lost packet when rx support wpa3. Copy default config from wifi default config. Create ble for local test and ble tester for autopts. Add config for local test. Add pts teset config for host test Add config for mesh test Create task to init blecontroller Delete blecontroller rx thread. using idle task to receive hci command from host Set ble device name to /dev/ble, and fix code. 1.fix a ke schedule risk 2. CFG_HOST is enabled only in the case that CONFIG_BLE_HOST_DISABLE is not enabled, by lanlan rm _sp_main stack. change h/l workq_stack_size 6K change l workq_stack_size 3K. [ble] delete file_detach color idle stack. clear bl602 netdev code SCAN is sorted according to RSSI enlarge nsh command line buffer fixup stack overflow check checkfail when startup arch/risc-v/BL602:fix reboot cause crash reboot default use romapi. riscv/bl602:netdev support defered input, remove wifi_tx function risc-v/bl602:fix sem_timedwait usage error in bl_cmds risc-v/bl602:fix memory access out of bounds when copy ssid remove ble and wifi source, download when build add bl602 blob gitignore risc-v/bl602:remove ble-pts defconfig Fix some typos in NuttX style naming Fix the replacement of tab to space fix wlan interface down still receive packet fix wapi crash, rx when ifdown,and ble_hci_rx_do change system reset to rom dirver change ble hci interval to 50ms NuttX support wifi enable/disable log via KConfig support country code configuration in Kconfig fix ap tx not work
2020-12-22 09:42:04 +01:00
LDFLAGS += --gc-sections -melf32lriscv --cref
LDFLAGS += -Map=$(TOPDIR)/nuttx.map