Configure LPCXpresso to use semihosting

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

Configure LPCXpresso to use semihosting

1,921件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by xjx on Thu Nov 05 17:28:46 MST 2015
Hello All,

I need to add semihosting capability to a project. I read the following note:

http://www.support.code-red-tech.com/CodeRedWiki/UsingPrintf

so I followed this steps:

1)  "Project -> Properties".
2) In the left-hand list of the Properties window, open "C/C++ Build" and select "Settings" and then the "Tool Settings" tab.
3) Choose "MCU Linker - Target"
4) In "Use C library" field, select either "Redlib (semihost)" or "Newlib (semihost)"

However, I can not do step 4. Could you please help?

I attach some related images.

thank you!!!


0 件の賞賛
返信
6 返答(返信)

1,621件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by xjx on Sun Nov 08 16:23:37 MST 2015
great 8473. that was the problem apparently.
0 件の賞賛
返信

1,621件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by 8473 on Fri Nov 06 06:42:46 MST 2015
Hello,

make sure the Project itself [the "root-folder"] is selected in Project Explorer. Sometimes (here) it is required to "re-select" the Project (..a few times?..) to enable the choices in the "Quick Settings".
0 件の賞賛
返信

1,621件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by xjx on Fri Nov 06 06:11:17 MST 2015

Quote: lpcxpresso-support
I suggest reading the current LPCXpresso FAQs in preference to the old Code Red FAQs, as some functionality has changed in the 2.5+ years since Code Red were acquired by NXP.

Some useful FAQs to start with can be found at:

https://www.lpcware.com/content/faq/lpcxpresso/using-printf
https://www.lpcware.com/content/faq/lpcxpresso/switching-selected-c-library

In additiona, if you are using LPCOpen, then some additional configuration may be required (as LPCOpen packages are often supplied configured to output over UART by default). For more details see:

https://www.lpcware.com/content/faq/lpcopen-debug-inputoutput-support

Regards,
LPCXpresso Support




Hello, in my case I can not use the "Quickstart -> Quick Settings -> Set library/header type" option: when I try, all the options in the menu are disabled (grey color).

Why could this be happening?

regards
0 件の賞賛
返信

1,621件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by xjx on Fri Nov 06 05:50:14 MST 2015

Quote: R2D2
Just change it in MCU Linker->Managed Linker Script...



Hello, i could do as you suggested. I can see that the semihosting libraries are compiling, and the size of the linker output has increased.

However, printf is still not working. I have checked that __main() initilizing redlib is present at startup code.

are there other steps I should complete before printf can write to console?

thanks!
0 件の賞賛
返信

1,621件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Thu Nov 05 18:27:41 MST 2015
I suggest reading the current LPCXpresso FAQs in preference to the old Code Red FAQs, as some functionality has changed in the 2.5+ years since Code Red were acquired by NXP.

Some useful FAQs to start with can be found at:

https://www.lpcware.com/content/faq/lpcxpresso/using-printf
https://www.lpcware.com/content/faq/lpcxpresso/switching-selected-c-library

In additiona, if you are using LPCOpen, then some additional configuration may be required (as LPCOpen packages are often supplied configured to output over UART by default). For more details see:

https://www.lpcware.com/content/faq/lpcopen-debug-inputoutput-support

Regards,
LPCXpresso Support
0 件の賞賛
返信

1,621件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Thu Nov 05 17:39:21 MST 2015
Just change it in MCU Linker->Managed Linker Script...
0 件の賞賛
返信