How to use regex on I.MX RT1050

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

How to use regex on I.MX RT1050

跳至解决方案
1,367 次查看
MassimilianoPegaso
Contributor II

Hi,

I'm relatively new in MCUXpresso projects, I need help with regex in an I.MX RT1050 project.

I tried to include "regex.h" and use regcomp and regexec but when I try to compile the code I have this errors:

- undefined reference to `regcomp'
- undefined reference to `regexec'

Why MCUXpresso find the .h file but it don't find the inplementation of the functions?

Thank you.

0 项奖励
回复
1 解答
1,301 次查看
Gavin_Jia
NXP TechSupport
NXP TechSupport

Hi @MassimilianoPegaso ,

This is a known issue from the GNU Arm Embedded Toolchain, the regular expression tool is implemented in newlib/libc/posix, but unfortunately posix is not yet enabled or compiled on targets such as arm-none-eabi.
So it's not available at the moment and that's why You won't find it in the C library.

https://answers.launchpad.net/gcc-arm-embedded/+question/208555

I've got a look to all .a provided file as part of toolchain, none of them is promoting 'regcomp' implementation.

Maybe https://github.com/kokke/tiny-regex-c is good solution.

 

Hope that helps!

 

Best regards,

Gavin

在原帖中查看解决方案

0 项奖励
回复
3 回复数
1,317 次查看
Gavin_Jia
NXP TechSupport
NXP TechSupport

Hi @MassimilianoPegaso ,

Hope you are doing well!

Could you provide more information about your project environment? Do you base on a demo in SDK? And what is the version number of your SDK / MCUXpresso ?

This information may help us reproduce your issue locally.

 

Best regards,

Gavin

0 项奖励
回复
1,315 次查看
MassimilianoPegaso
Contributor II

Hi @Gavin_Jia,

My project is based on sdk example: evkbimxrt1050_mcuboot_opensource. I use MCUXpresso IDE v11.8.0 and SDK_2.x_EVKB-IMXRT1050 v2.14.0.

Thank you, regards.

0 项奖励
回复
1,302 次查看
Gavin_Jia
NXP TechSupport
NXP TechSupport

Hi @MassimilianoPegaso ,

This is a known issue from the GNU Arm Embedded Toolchain, the regular expression tool is implemented in newlib/libc/posix, but unfortunately posix is not yet enabled or compiled on targets such as arm-none-eabi.
So it's not available at the moment and that's why You won't find it in the C library.

https://answers.launchpad.net/gcc-arm-embedded/+question/208555

I've got a look to all .a provided file as part of toolchain, none of them is promoting 'regcomp' implementation.

Maybe https://github.com/kokke/tiny-regex-c is good solution.

 

Hope that helps!

 

Best regards,

Gavin

0 项奖励
回复