How to use regex on I.MX RT1050

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to use regex on I.MX RT1050

ソリューションへジャンプ
911件の閲覧回数
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 解決策
845件の閲覧回数
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 返答(返信)
861件の閲覧回数
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 件の賞賛
返信
859件の閲覧回数
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 件の賞賛
返信
846件の閲覧回数
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 件の賞賛
返信