Skip to main content
KiptonM
Senior III
February 11, 2021
Question

How do you add a .ioc file to an existing project that does not have one?

  • February 11, 2021
  • 8 replies
  • 3882 views

I got the example files from here:

You are missing the famous set of examples for UART with DMA by Tilen Majerle.

https://github.com/MaJerle/stm32-usart-uart-dma-rx-tx

I selected the project usart_dma_rx_idle_line_irq_F4.

First thing I notice, it did not have a .ioc file for me to configure the rest of the chip.

I do not know how to fix this. It is for a generic F4. I have a Nucleo-F446RE.

Is the missing .ioc the cause of the error:

arm-none-eabi-objcopy.exe -O ihex "usart_dma_rx_idle_line_irq_F4.elf" "usart_dma_rx_idle_line_irq_F4.hex"

/bin/sh: 1: arm-none-eabi-objcopy.exe: not found

make[1]: *** [makefile:84: post-build] Error 127

make: *** [makefile:52: all] Error 2

"make -j12 all" terminated with exit code 2. Build might be incomplete.

This topic has been closed for replies.

8 replies

Tilen MAJERLE
ST Employee
February 11, 2021

Hi Kmora,

What is the CubeIDE version you are using to compile this?

Thanks, Tilen

KiptonM
KiptonMAuthor
Senior III
February 11, 2021

STM32CubeIDE

Version: 1.5.1

Build: 9029_20201210_1234 (UTC)

Do not assume I know what I am doing. I am new at working with ST products. (i.e. a couple of weeks).

Even though I have been programming C for over 40 years.

Cartu38 OpenDev
Graduate II
February 11, 2021

Missing .ioc file cannot be related at all to project compilation issue. Be sure about.

.ioc file is embedding selected device configuration settings if intending to revisit them later on Thanks Device Configuration Tool allowing code update.

Project compilation is only dealing with project setups (symbols, ...) & source (.c / .h / .ld) files

Here you have an error at post build step lacking from a toolchain component (arm-none-eabi-objcopy.exe file) ... I would kindly advice to reinstall your STM32CubeIDE product here ... sounds part of product is missing ... Which OS (Mac, Win, Linux) are you relying on ?

KiptonM
KiptonMAuthor
Senior III
February 11, 2021

I am running the Linux version.

I thought it had something to do with the .ioc as all other projects I have created started with nucleo boards and have been working without a problem.

When I look at the environment variables Project->Properties->C/C+ Build->Environment compiler_prefix arm-none-eabi-

Is that correct? Or should it be something else?

Kip

Cartu38 OpenDev
Graduate II
February 11, 2021

Despite I would be worried about such missing arm-none-eabi-objcopy.exe file as sounds post build step doing .elf to .hex is failing have a try to just skip it. .hex is just an extra binary you don't care about. .elf is far best one.

Just right click on your project root within project explorer. Select Properties as part of contextual menu then uncheck .hex generation:

0693W000008FvNJQA0.jpg 

KiptonM
KiptonMAuthor
Senior III
February 11, 2021

Would this have anything to do with the fact that the directory from github was placed in /home/kip/STM32CubeIDE and not /home/kip/STM32CubeIDE/workspace_1.5.1?

I know it may be a stupid question but I am new to this environment and IDE.

Cartu38 OpenDev
Graduate II
February 11, 2021

/home/kip/STM32CubeIDE path should be ok ... just please could you share where STM32CubeIDE project is installed .... takes care to not mix product install path and workspace ...

KiptonM
KiptonMAuthor
Senior III
February 11, 2021

I am having difficulties determining where it is installed. I thought it was under /home/kip

But it looks like it may be /opt/st/stm32cubeide_1.5.1

From STM32CubeIDEInstallation Details Configuration

*** Date: Thursday, February 11, 2021 3:17:57 PM CST

*** Platform Details:

*** System properties:

applicationXMI=org.eclipse.ui.workbench/LegacyIDE.e4xmi

awt.toolkit=sun.awt.X11.XToolkit

ds.delayed.keepInstances=true

ds.delayed.keepInstances.default=true

eclipse.application=org.eclipse.ui.ide.workbench

eclipse.buildId=Version 1.5.1

eclipse.commands=-os

linux

-ws

gtk

-arch

x86_64

-showsplash

-launcher

/opt/st/stm32cubeide_1.5.1/stm32cubeide

-name

Stm32cubeide

--launcher.library

/opt/st/stm32cubeide_1.5.1//plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.1200.v20200508-1552/eclipse_1801.so

-startup

/opt/st/stm32cubeide_1.5.1//plugins/org.eclipse.equinox.launcher_1.5.700.v20200207-2156.jar

--launcher.overrideVmargs

-exitdata

8028

-vm

/opt/st/stm32cubeide_1.5.1/jre/bin/java

eclipse.home.location=file:/opt/st/stm32cubeide_1.5.1/

eclipse.launcher=/opt/st/stm32cubeide_1.5.1/stm32cubeide

eclipse.launcher.name=Stm32cubeide

eclipse.p2.data.area=@config.dir/../p2/

eclipse.p2.profile=STM32CubeIDE

eclipse.product=com.st.stm32cube.ide.mcu.rcp.product

eclipse.startTime=1613008054242

eclipse.stateSaveDelayInterval=30000

eclipse.vm=/opt/st/stm32cubeide_1.5.1/jre/bin/java

eclipse.vmargs=-Dosgi.requiredJavaVersion=1.8

-Dosgi.instance.area.default=@user.home/STM32CubeIDE/workspace_1.5.1

-Declipse.buildId=Version 1.5.1

-DproductMaturityGrade=mm

-XX:+UseG1GC

-XX:+UseStringDeduplication

-Xms256m

-Xmx1024m

-jar

/opt/st/stm32cubeide_1.5.1//plugins/org.eclipse.equinox.launcher_1.5.700.v20200207-2156.jar

KiptonM
KiptonMAuthor
Senior III
February 11, 2021

When I built a project for the Nucleo-F446RE I look at Project->Properties->C/C+ Build->Settings under the Build Steps Tab there is nothing under Post-build steps.

With the usart_dma_rx_idle_line_irq_F4 progect in the same place it has

arm-none-eabi-objcopy.exe -O ihex "${BuildArtifactFileBaseName}.elf" "${BuildArtifactFileBaseName}.hex"

I did a search under /home/kip/STM32CubeIDE/workspace_1.5.1 directory and did not find a file "arm-none-eabi-objcopy.exe"

So I tried to search the whole computer from the / directory. (Maybe it was a path issue.) it is taking a long time, so I will get back to you when it finishes searching through the whole computer.

KiptonM
KiptonMAuthor
Senior III
February 12, 2021

I scrwed up the file, and decided it was best to re-download the project.

I looked over the projects and wanted to have an example with transmit DMA. The Documentation said:

Examples for RX & TX

  • Available in projects folder with usart_tx_prefix
  • DMA is used to receive data and to transmit data back
  • It uses ring buffer to copy data from DMA buffer to application buffer first

Unfortunately there were no examples that started with usart_tx. There were only usart_rx.

I wanted to see if I could get something to work. Since I have a Nucleo-F446RE there were only 2 choices.

usart_rx_idle_line_irq_F4

usart_rx_idle_line_irq_rtos_F4

And since I did not want RTOS I went with usart_rx_idle_line_irq_F4

I used File->Open Projects from File System, and pointed into that directory (/home/kip/STM32CubeIDE/stm32-usart-uart-dma-rx-tx-master/projects/usart_rx_idle_line_irq_rtos_F4)

Deleted the post build command with arm-none-eabi-objcopy.exe program. I have searched the whole computer and did not find the file. )

Compiled Project with no errors or warnings.

I put my FTDI TTL-232R-3V3-WE cable on the USART3 TX and RX and Gnd. Set up the moserial program to look at the the /dev/ttyUSB0 and set it at 115200 Baud 8-N-1 No handshake.

And started in the debugger. It appears it went directly to HardFault_Handler(void) in the stm32f4xx_it.c file. And then stayed in the empty while(1) loop.

Maybe the program does not like the debugger.

So I ran it. Since I have never just ran a program not sure how it is supposed to go but it said

Download verified successfully

Debugger connection lost.

Shutting down...

Which I am guessing is correct.

And nothing happens. I tried typing something to see if it echoed back. Nothing.

So I am guessing something is wrong an it is in the same Hard_Fault_Handler() it went to in the Debugger.

What should I do next?

KiptonM
KiptonMAuthor
Senior III
February 12, 2021

By the way I know my serial ports are working because I have another program that does a simple polling write to each serial port

/* USER CODE BEGIN 0 */

uint8_t data1[] = {"11111111111111111111111111111111111111111111111111111111111111\r\n"};

uint8_t data2[] = {"22222222222222222222222222222222222222222222222222222222222222\r\n"};

uint8_t data3[] = {"33333333333333333333333333333333333333333333333333333333333333\r\n"};

uint8_t data4[] = {"44444444444444444444444444444444444444444444444444444444444444\r\n"};

uint8_t data5[] = {"55555555555555555555555555555555555555555555555555555555555555\r\n"};

uint8_t data6[] = {"66666666666666666666666666666666666666666666666666666666666666\r\n"};

/* USER CODE END 0 */

And then farther down it has

 while (1)

 {

   /* USER CODE END WHILE */

   /* USER CODE BEGIN 3 */

    HAL_UART_Transmit(&huart1, data1, sizeof(data1), 1000);

    HAL_UART_Transmit(&huart2, data2, sizeof(data2), 1000);

    HAL_UART_Transmit(&huart3, data3, sizeof(data3), 1000);

    HAL_UART_Transmit(&huart4, data4, sizeof(data4), 1000);

    HAL_UART_Transmit(&huart5, data5, sizeof(data5), 1000);

    HAL_UART_Transmit(&huart6, data6, sizeof(data6), 1000);

    HAL_Delay(250);

 }

 /* USER CODE END 3 */

And that works on all the ports except USART2. I now have had 2 boards where USART2 does not work. the other 5 do. But that is another issue.