10 years, 3 months ago.

building IAR toolchain for Nucleo stm32F401re board

Even after correcting the settings.py and private_settings.py, it gets further by copying a bunch of files but will error out with the same error below: startup_stm32f401xe.s [Errno 2] No such file or directory. I did look at the mbed.org site at https://mbed.org/questions/3663/I-cant-work-tutorial-1768-buildpy/ and still got the same error.

What command are you running? What does your private_settings.py look like? Please paste them here using <<code>> <</code> to make it readable.

posted by Sam Grove 16 Sep 2014

python build.py -m NUCLEO_F401RE -t IAR -c
posted by vinnie dork 16 Sep 2014

Can you also add the relevant parts of private_settings.py ??

posted by Sam Grove 16 Sep 2014

<<code>> python build.py -m NUCLEO_F401RE -t IAR -c <</code>

posted by vinnie dork 16 Sep 2014

see next comment below for private_settings.py

posted by vinnie dork 16 Sep 2014

"""
mbed SDK
Copyright (c) 2011-2013 ARM Limited
    http://www.apache.org/licenses/LICENSE-2.0
"""
from os.path import join, abspath, dirname
import logging
ROOT = abspath(join(dirname(__file__), ".."))
# These default settings have two purposes:
#    1) Give a template for writing local "private_settings.py"
#    2) Give default initialization fields for the "toolchains.py" constructors
##############################################################################
# Build System Settings
##############################################################################
BUILD_DIR = abspath(join(ROOT, "build"))
# ARM
armcc = "standalone" # "keil", or "standalone", or "ds-5"
if armcc == "keil":
    ARM_PATH = "C:/Keil_4_54/ARM"
    ARM_BIN = join(ARM_PATH, "BIN40")
    ARM_INC = join(ARM_PATH, "RV31", "INC")
    ARM_LIB = join(ARM_PATH, "RV31", "LIB")

elif armcc == "standalone":
    ARM_PATH = "C:/Program Files/ARM/armcc_4.1_791"
    ARM_BIN = join(ARM_PATH, "bin")
    ARM_INC = join(ARM_PATH, "include")
    ARM_LIB = join(ARM_PATH, "lib")

elif armcc == "ds-5":
    ARM_PATH = "C:/Program Files (x86)/DS-5"
    ARM_BIN = join(ARM_PATH, "bin")
    ARM_INC = join(ARM_PATH, "include")
    ARM_LIB = join(ARM_PATH, "lib")

ARM_CPPLIB = join(ARM_LIB, "cpplib")
MY_ARM_CLIB = join(ARM_PATH, "lib", "microlib")

# GCC ARM
GCC_ARM_PATH = ""
# GCC CodeSourcery
GCC_CS_PATH = "C:/Program Files (x86)/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_EABI/bin"
# GCC CodeRed
GCC_CR_PATH = "C:/code_red/RedSuite_4.2.0_349/redsuite/Tools/bin"
# IAR
#vince orig IAR_PATH = "C:/Program Files (x86)/IAR Systems/Embedded Workbench 6.0/arm"
IAR_PATH = "C:/Program Files (x86)/IAR Systems/Embedded Workbench 7.0/arm"
# GCC Code Warrior
CW_GCC_PATH  = "C:/Freescale/CW MCU v10.3/Cross_Tools/arm-none-eabi-gcc-4_6_2/bin"
CW_EWL_PATH = "C:/Freescale/CW MCU v10.3/MCU/ARM_GCC_Support/ewl/lib"
# Goanna static analyser. Please overload it in private_settings.py
GOANNA_PATH = "c:/Program Files (x86)/RedLizards/Goanna Central 3.2.3/bin"
# cppcheck path (command) and output message format
CPPCHECK_CMD = ["cppcheck", "--enable=all"]
CPPCHECK_MSG_FORMAT = ["--template=[{severity}] {file}@{line}: {id}:{message}"]
BUILD_OPTIONS = []
# mbed.org username
MBED_ORG_USER = ""
##############################################################################
# Private Settings
##############################################################################
try:
    # Allow to overwrite the default settings without the need to edit the
    # settings file stored in the repository
    from workspace_tools.private_settings import *
except ImportError:
    print '[WARNING] Using default settings. Define you settings in the file "workspace_tools/private_settings.py" or in "./mbed_settings.py"'
posted by vinnie dork 16 Sep 2014

Is that where your IAR installation is? This is for mine and I can build:

python build.py -m LPC1768 -t IAR -c

with

IAR_PATH = "C:/Program Files (x86)/IAR Systems/Embedded Workbench 7.0/arm"

Looks like F401RE wont build with IAR due to duplicate a NULL definition https://github.com/mbedmicro/mbed/issues/482

posted by Sam Grove 16 Sep 2014

yes, it's correct. The following is output when I build:

Building library CMSIS (NUCLEO_F401RE, IAR)
Copy: core_cmInstr.h
Copy: core_cm4_simd.h
Copy: core_cm0.h
Copy: core_cm4.h
Copy: core_cm0plus.h
Copy: core_cm3.h
Copy: core_cmFunc.h
Copy: stm32f4xx_hal_crc.h
Copy: hal_tick.h
Copy: stm32f4xx_hal_i2s.h
Copy: stm32f4xx_hal_smartcard.h
Copy: stm32f4xx_hal_pcd.h
Copy: stm32f4xx_hal_flash_ex.h
Copy: stm32f4xx_hal_can.h
Copy: stm32f4xx_hal_dma.h
Copy: stm32f4xx_hal_rcc.h
Copy: stm32f4xx_hal_nor.h
Copy: stm32f4xx_ll_fsmc.h
Copy: stm32f4xx_hal_sdram.h
Copy: stm32f4xx_hal_hcd.h
Copy: stm32f4xx_hal_cryp_ex.h
Copy: stm32f4xx_hal_i2s_ex.h
Copy: stm32f4xx.h
Copy: stm32f4xx_hal_ltdc.h
Copy: stm32f4xx_hal_irda.h
Copy: stm32f4xx_hal_hash.h
Copy: system_stm32f4xx.h
Copy: stm32f4xx_hal_rtc.h
Copy: stm32f4xx_ll_usb.h
Copy: stm32f4xx_hal_eth.h
Copy: stm32f4xx_hal_tim.h
Copy: stm32f4xx_hal_rcc_ex.h
Copy: stm32f4xx_hal_sd.h
Copy: stm32f4xx_hal_gpio.h
Copy: stm32f4xx_hal_def.h
Copy: stm32f4xx_hal_cryp.h
Copy: stm32f4xx_hal_dac.h
Copy: stm32f4xx_hal_wwdg.h
Copy: stm32f4xx_ll_sdmmc.h
Copy: stm32f4xx_hal_adc.h
Copy: stm32f401xe.h
Copy: cmsis.h
Copy: stm32f4xx_hal_i2c_ex.h
Copy: stm32f4xx_hal.h
Copy: stm32f4xx_hal_iwdg.h
Copy: stm32f4xx_hal_dcmi.h
Copy: stm32f4xx_hal_dac_ex.h
Copy: stm32f4xx_hal_rtc_ex.h
Copy: stm32f4xx_hal_flash.h
Copy: cmsis_nvic.h
Copy: stm32f4xx_hal_tim_ex.h
Copy: stm32f4xx_hal_usart.h
Copy: stm32f4xx_hal_uart.h
Copy: stm32f4xx_hal_rng.h
Copy: stm32f4xx_hal_cortex.h
Copy: stm32f4xx_hal_i2c.h
Copy: stm32f4xx_hal_sram.h
Copy: stm32f4xx_hal_pwr.h
Copy: stm32f4xx_hal_conf.h
Copy: stm32f4xx_hal_pwr_ex.h
Copy: stm32f4xx_hal_pccard.h
Copy: stm32f4xx_ll_fmc.h
Copy: stm32f4xx_hal_nand.h
Copy: stm32f4xx_hal_spi.h
Copy: stm32f4xx_hal_dma_ex.h
Copy: stm32f4xx_hal_dma2d.h
Copy: stm32f4xx_hal_hash_ex.h
Copy: stm32f4xx_hal_adc_ex.h
Copy: stm32f4xx_hal_gpio_ex.h
Copy: stm32f4xx_hal_sai.h
Copy: stm32f401xe.icf
Assemble: startup_stm32f401xe.s
[Errno 2] No such file or directory
Completed in: (0.02)s

  Build failures:
  * IAR::NUCLEO_F401RE
posted by vinnie dork 16 Sep 2014

Are you able to build for a different target?

python build.py -m LPC1768 -t IAR -c
posted by Sam Grove 16 Sep 2014

according to the following mbed document matrix, the NUCLEO_F401RE isn't supported by IAR, not all listed.

c:\temp\repos\mbed\workspace_tools> python build.py -S
+---------------+-----------+-----------+-----------+-----------+-----------+-----------+------------+---------------+
| Platform      |    ARM    |    uARM   |  GCC_ARM  |   GCC_CS  |   GCC_CR  |    IAR    | GCC_CW_EWL | GCC_CW_NEWLIB |
+---------------+-----------+-----------+-----------+-----------+-----------+-----------+------------+---------------+
| ARCH_BLE      | Supported |     -     |     -     |     -     |     -     |     -     |     -      |       -       |
| LPC1768       | Supported | Supported | Supported | Supported | Supported | Supported |     -      |       -       |
| LPC2368       | Supported |     -     | Supported |     -     | Supported |     -     |     -      |       -       |
| LPC4088       | Supported |     -     | Supported |     -     | Supported |     -     |     -      |       -       |
| LPC4330_M4    | Supported |     -     | Supported |     -     | Supported | Supported |     -      |       -       |
| LPC810        |     -     | Supported |     -     |     -     |     -     |     -     |     -      |       -       |
| LPC812        |     -     | Supported |     -     |     -     |     -     |     -     |     -      |       -       |
| NRF51822      | Supported |     -     |     -     |     -     |     -     |     -     |     -      |       -       |
| NUCLEO_F030R8 | Supported | Supported |     -     |     -     |     -     |     -     |     -      |       -       |
| NUCLEO_F072RB | Supported | Supported |     -     |     -     |     -     |     -     |     -      |       -       |
| NUCLEO_F103RB | Supported | Supported | Supported |     -     |     -     |     -     |     -      |       -       |
| NUCLEO_F302R8 | Supported | Supported |     -     |     -     |     -     |     -     |     -      |       -       |
| NUCLEO_F401RE | Supported | Supported | Supported |     -     |     -     |     -     |     -      |       -       |
| NUCLEO_L053R8 | Supported | Supported |     -     |     -     |     -     |     -     |     -      |       -       |
| NUCLEO_L152RE | Supported | Supported |     -     |     -     |     -     |     -     |     -      |       -       |
| STM32F3XX     | Supported | Supported | Supported |     -     |     -     |     -     |     -      |       -       |
| XADOW_M0      | Supported | Supported | Supported |     -     | Supported |     -     |     -      |       -       |
+---------------+-----------+-----------+-----------+-----------+-----------+-----------+------------+---------------+
Total permutations: 92
posted by vinnie dork 16 Sep 2014

I'll try your target ( python build.py -m LPC1768 -t IAR -c)

posted by vinnie dork 16 Sep 2014

building for LPC1768 gives same error on startup file. The following has the ouput of the build of python build.py -m LPC1768 -t IAR -c

Building library CMSIS (LPC1768, IAR)
Copy: core_cmInstr.h
Copy: core_cm4_simd.h
Copy: core_cm0.h
Copy: core_cm4.h
Copy: core_cm0plus.h
Copy: core_cm3.h
Copy: core_cmFunc.h
Copy: LPC17xx.h
Copy: system_LPC17xx.h
Copy: cmsis.h
Copy: cmsis_nvic.h
Copy: LPC17xx.icf
Assemble: startup_LPC17xx.s
[Errno 2] No such file or directory
Completed in: (0.01)s

  Build failures:
  * IAR::LPC1768
posted by vinnie dork 16 Sep 2014

I was not able to build for your target (LPC1768). My build output is posted above

posted by vinnie dork 16 Sep 2014

Is the LPC1768 not building on my system due to a duplicate NULL definition? here's your link to duplicate NULL issue you posted earlier: https://github.com/mbedmicro/mbed/issues/482

posted by vinnie dork 16 Sep 2014

Your problem seems to be the location or installation of IAR. The LPC1768 example should build out of the box complete when these are set correctly. The NULL incompatibility is only for ST targets, not the LPC1768.

posted by Sam Grove 16 Sep 2014

I've got an evaluation version of the IAR compiler, there's a license issue now.

posted by vinnie dork 17 Sep 2014
Be the first to answer this question.