cancel
Showing results for 
Search instead for 
Did you mean: 

CubeMx problem Stm32L476RG with expansion board X-Nucleo-53L0A1

Gp3 Reverse
Associate II
Posted on May 11, 2018 at 00:27

Hi everyone,

I'm working with STm32L476RG on the example that I've downloaded from the St official site about the Ranging Satellites (with the expansion board 53L0A1). The problem is, when I try to generate the code with CubeMx for Iar version 8.22.2, the result is this error:

'Error[Pe1696]: cannot open source file X-NUCLEO-53L0A1.h'

I think this problem can occur if the IAR project has a different version that the project was made on.

I tried the next procedure to add the missing file:

Project -> Options -> C/C++ compiler -> Preprocessor and add the directories where the files can be found.

But the problem is not solved, because there is a new similar error with an other missing file 'mxconstant'.

How can I solve this problem?

Thank you for attention and hoping that anyone can help me.

#x-nucleo-53l0a1 #stm32l476rg #stm32-iar
1 ACCEPTED SOLUTION

Accepted Solutions
Gp3 Reverse
Associate II
Posted on May 14, 2018 at 15:57

@

Thank you for answering.

This is my .ioc that I've downloaded from St official site, without editing.

Generating the code on Iar there is the error that I've wrote before.

________________

Attachments :

NucleoL476.ioc.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006Hxdg&d=%2Fa%2F0X0000000b0M%2F9ISmRkgdWEpuf0f4cg.95lAxTODcrqYWF1xaERt_rTk&asPdf=false

View solution in original post

6 REPLIES 6
Imen.D
ST Employee
Posted on May 14, 2018 at 14:31

Hello

gp3reverse

,

Please

check that this issue is not reproduced with the latest version of CubeMx and IAR and

that you are

specifying all the include paths for the project properly.

Otherwhise,

share your .ioc to report this case andidentify what is going wrong.

Best Regards,

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
Gp3 Reverse
Associate II
Posted on May 14, 2018 at 15:57

@

Thank you for answering.

This is my .ioc that I've downloaded from St official site, without editing.

Generating the code on Iar there is the error that I've wrote before.

________________

Attachments :

NucleoL476.ioc.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006Hxdg&d=%2Fa%2F0X0000000b0M%2F9ISmRkgdWEpuf0f4cg.95lAxTODcrqYWF1xaERt_rTk&asPdf=false
Posted on May 16, 2018 at 19:09

Hi

gp3reverse

Why are you using the FW L4 version 1.0.0 it is too old ?

Gp3 Reverse
Associate II
Posted on May 17, 2018 at 20:12

Hello, i'm using the version contained on the expansion board exercise, I've tried to update but the issue is not solved.

Nawres GHARBI
ST Employee
Posted on May 21, 2018 at 12:32

Hello, I succeeded to reproduce your issue. 

To fix it please add those two lines to the preprocessors:

$PROJ_DIR$/../../../../../../Drivers/BSP/X-NUCLEO-53L0A1

$PROJ_DIR$/../../../../../../Drivers/BSP/Components/vl53l0x

uncomment in stm32l4xx_hal_conf.h

#define HAL_TIM_MODULE_ENABLED 

add files to project:

in STM32CubeExpansion_VL53L0X_V1.2.0\Drivers\BSP\X-NUCLEO-53L0A1

         - X-NUCLEO-53L0A1.c

         - vl53l0x_platform.c

.c files in 'STM32CubeExpansion_VL53L0X_V1.2.0\Drivers\BSP\Components\vl53l0x'

Posted on May 21, 2018 at 14:02

 ,

 ,

Hello, i'm trying to do your steps:

To fix it please add those two lines to the preprocessors:

$PROJ_DIR$/../../../../../../Drivers/BSP/X-NUCLEO-53L0A1 ,  ,

-------->,

DONE

 ,

$PROJ_DIR$/../../../../../../Drivers/BSP/Components/vl53l0x ,  ,

-------->,

DONE

uncomment in stm32l4xx_hal_conf.h

♯ define HAL_TIM_MODULE_ENABLED -------->,DONE

add files to project:

in ,STM32CubeExpansion_VL53L0X_V1.2.0\Drivers\BSP\X-NUCLEO-53L0A1

 , , , , , , , , ,- X-NUCLEO-53L0A1.c , ,

-------->,

DONE

 , , , , , , , , ,- ,vl53l0x_platform.c ,  ,

-------->,

DONE

.c files in ''STM32CubeExpansion_VL53L0X_V1.2.0\Drivers\BSP\Components\vl53l0x''

in the last line, what do you mean for :

.c files in ''STM32CubeExpansion_VL53L0X_V1.2.0\Drivers\BSP\Components\vl53l0x''

 ,

I need to add others files? (referred to the last line)

In this moment. after these steps, if I compile the code, there is 1 error, it is: ,

Fatal Error[Pe1696]: cannot open source file ''mxconstants.h'' ,

 ,

0690X0000060KsyQAE.png