Compiling example project for iMXRT1064 as C++ project - Stuck in ROMCP memory region

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Compiling example project for iMXRT1064 as C++ project - Stuck in ROMCP memory region

Jump to solution
998 Views
CarrotMan
Contributor II

I tested dev_cdc_vcom_lite_bm example from NXP and it worked great. However, I want to use C++ for my project. There was a guide online on how to migrate C to C++ in Eclipse, however, experts suggested to create a new C++ project instead. That is what I did. I added all the files from the original dev_cdc_vcom_lite_bm example. Initially this caused some linker issues due to lack of extern "C" safeguard, but after I wrapped the declarations in C files, everything compiled and linked. I use NewlibNano and in linker I have selected -nostdlib.

 

What happens now is after upload the debugger does not stop anywhere, and if I stop the debug session it seems to be stuck at 0x21aaca or around there. In reference manual memory region 0020_0000 0021_FFFF is defined as ROMCP.

 

It is unclear to me why it is stuck there, what could be the reasons?

If additional info is necessary to debug this issue, please let me know!

 

 

0 Kudos
Reply
1 Solution
982 Views
CarrotMan
Contributor II

Dear Jeremy,

 

I was creating a list of steps that I did and now it works. I believe that what happened was that I used redlib when importing C SDK example and dropped those files on top of C++ project? It is unclear, but right now it reaches the main correctly. USB does not enumerate, but that is another ticket.

Thank you again!

View solution in original post

2 Replies
983 Views
CarrotMan
Contributor II

Dear Jeremy,

 

I was creating a list of steps that I did and now it works. I believe that what happened was that I used redlib when importing C SDK example and dropped those files on top of C++ project? It is unclear, but right now it reaches the main correctly. USB does not enumerate, but that is another ticket.

Thank you again!

985 Views
jeremyzhou
NXP Employee
NXP Employee

Hi,
Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
Before answering your question, I was wondering if you can list the steps of creating a C++ project for dev_cdc_vcom_lite_bm, as it can help me to figure it out.
Looking forward to your reply.
Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------