LPCOpen Multicore Example not working in MCUXpresso 11.1?

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

LPCOpen Multicore Example not working in MCUXpresso 11.1?

4,756件の閲覧回数
a_bet
Contributor IV

Hi to you all,
my setup:
IDE: MCUXpresso IDE v11.0.1 [Build 2563] [2019-09-01]
Board: LPC-Link2 w/ LPC4370 mcu

I'm exploring multicore projects, but I wonder how is the mcuxpresso support for this rather old hw.

Here's what I did:

  • downloaded latest LPCOpen
  • imported projects from LPCOopen.zip archive in a fresh, newly created work space
  • Compiled projects

What I notice is that simple M4 project periph_blinky is working just fine: I can debug it and see the led flash in my lpclink2.

The problem comes whit multicore projects.
I imported multicore_blinky_m4, multicore_blinky_m0app and multicore_blinky_m0sub. m0app and m0sub projects are giving me these warnings respectively:

Invalid project path: Include path not found (lpc_chip_43xx_m0/inc/config_m0app).
Invalid project path: Include path not found (lpc_chip_43xx_m0/inc/usbd).

and

Invalid project path: Include path not found (lpc_chip_43xx_m0/inc/config_m0app).
Invalid project path: Include path not found (lpc_chip_43xx_m0/inc/usbd).

 I solved them by changing the path under properties/C/C++ Build/Settings/Tool Settings/MCU Assembler/General from:

"${workspace_loc:/lpc_chip_43xx_m0/inc/usbd}"

to

"${workspace_loc:/lpc_chip_43xx_m0/inc/usbd_rom}"

And from

"${workspace_loc:/lpc_chip_43xx_m0/inc/config_m0sub}"

to

"${workspace_loc:/lpc_chip_43xx_m0/inc/config_43xx_m0sub}"


Everything now compiles just fine, and I can start a debug session (I choose jtag for multicore).
As soon as I hit run after first breakpoint is reached i got an hard fault. PC point to M0Image_Boot() so I guess the problem is related to the boot of the core m0.
The code giving the error is:

    /* Sanity check, see if base address and reset handler address resides in same region */
    if ((m0_image_addr & 0xFFF00000) != ((*(unsigned long *) (m0_image_addr + 4)) & 0xFFF00000)) {
        return -2;
    }


Please find attached the screenshots of the faults tab and register tab.

Any idea on how to solve this?

Best,
Andrea

ラベル(3)
19 返答(返信)

4,096件の閲覧回数
lpcxpresso_supp
NXP Employee
NXP Employee

I imagine that you are encountering a long standing issue with the LPC43xx LPCOpen packages that their multicore examples are not proper MCUXpresso IDE multicore projects. You can find more details including a proper IDE multicore example at:

https://community.nxp.com/message/792775?commentID=792775#comment-792775 

Regards,

MCUXpresso IDE Support 

4,096件の閲覧回数
a_bet
Contributor IV

lpcxpresso_support
Here's my take on multicore project creation. It would be great if you could check and tell if here's anything wrong at least at first sight.


Thanks:)

Andrea

0 件の賞賛
返信

4,096件の閲覧回数
ZhangJennie
NXP TechSupport
NXP TechSupport

I think you should have no issue to work with the multicore project provided by LPCXpresso Support. It can run on MCUXpresso IDE v11.1.1 without issue. 

So far as I know, there is no plan to have new version of lpcopen.

Best Regards

Jun Zhang

0 件の賞賛
返信

4,096件の閲覧回数
a_bet
Contributor IV

Hi ZhangJennie
I figured out how to properly create multicore projects for LPC43XX under MCUXpresso thanks, maybe I will post here a guide in future.
Unfortunately I'm still stuck on having the USB working on the M0SUB core. There is practically no documentation, nor any useful post here in the community.
You can look at my question here: https://community.nxp.com/thread/530166 
it would be great if someone from the support could help with this.

Best,
Andrea

0 件の賞賛
返信

4,096件の閲覧回数
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi

I just checked , your other question LPC43XX use m0sub with usb  is handled by my colleague, he is checking this and will answer you.

Thanks,

Jun Zhang

4,096件の閲覧回数
a_bet
Contributor IV

lpcxpresso_support‌ I was able to run and debug the project hosted at the link you sent.
I needed to change the flash driver to

LPC18_43_SPIFI_GENERIC.cfx

Because mcuxpresso was not able to find the other previously specified.

Now my goal is to define a procedure to build from scratch a multicore project in mcuxpresso than does the following:
- boots m0sub
- system timer periodically interrupts m4
- in the interrupt routine a signal is sent to m0sub, which is interrupted

- m0sub ISR toggles led 0
After all of this is working, debug included, I will upload the code on a public repo on github as well as document the project creation with a video. I would really like to clarify the whole process in order to help other people which struggle with this.
Can you help me with this?
Also, why is mcuxpresso oncluding LPCOpen 2.12 when the latest release is LPCOpen 3?

Best,
Andrea

0 件の賞賛
返信

4,096件の閲覧回数
a_bet
Contributor IV

Thank you lpcxpresso_support‌ for the link.
I'm now using examples projects that I found in `/usr/local/mcuxpressoide-11.1.1_3241/ide/Examples/LPCOpen` as suggested by Jennie.
Are they meant to be used with MCUxpresso? In the videos I attached you can see the issues I get while trying to debug.

Best,
Andrea

0 件の賞賛
返信

4,096件の閲覧回数
a_bet
Contributor IV

Hi ZhangJennie‌,

thanks for the reply.
I downloaded and installed "MCUXpresso IDE v11.1.1 [Build 3241] [2020-03-02]" but unfortunately, again after fixing warnings, I got the exact same behavior.
Is there something I can do my self to fix this?

Best,
Andrea

0 件の賞賛
返信

4,096件の閲覧回数
ZhangJennie
NXP TechSupport
NXP TechSupport

Andrea Bettati

Have you already rebuild lpc_chip_xxx and lpc_board_xxx libs before building the blink demo?

If not, you need do it first.

If you already did so, but still have problem, please send me a video of your whole process, I will check it on my side.

Have a nice day,

Jun Zhang

4,096件の閲覧回数
a_bet
Contributor IV

Hi ZhangJennie
I tried to clean and rebuild the projects, but unfortunately it doesn't help.
I read the docs (mcuxpresso ide user guide) and from my understanding to execute a multicore project (slave code download + release) I just need to launch debug for the m$ master code right?

Here's the video: Firefox Send 
(could not upload using the "insert video" button)

Best,
Andrea

0 件の賞賛
返信

4,096件の閲覧回数
a_bet
Contributor IV

Hi ZhangJennie‌,
any news on your side? Some other tests I could do or info I could provide?

Best,
Andrea

0 件の賞賛
返信

4,096件の閲覧回数
ZhangJennie
NXP TechSupport
NXP TechSupport

Andrea Bettati

I build and run the demo on my side, i didn't reproduce your issue. see my video attached. I use MCUXpresso IDE v11.1.0

I build all the libs shown in my video.

I would suggest you testing it on another computer to verify if the problem is on one computer.

Have a nice day,

Jun Zhang

0 件の賞賛
返信

4,096件の閲覧回数
a_bet
Contributor IV

Hi ZhangJennie‌,
I tried on a windows 10 machine, MCUXpresso v11.1.1 and the problem stays the same.
Here you can find the video (laggish because I had to remote-connect).

I tried to download mcuxpresso v 11.0.1 but was not able to find it. Could it be because we are using different releases (v11.0.1 and v11.1.1) that I have the problem?


Best,
Andrea

0 件の賞賛
返信

4,096件の閲覧回数
ZhangJennie
NXP TechSupport
NXP TechSupport

I tested the code under MCUXpresso IDE 11.1.1, no issue. see attached video.

I also record how to download MCuxresso IDE old versions. I suggest you download 11.1.0 to test. 11.0.1 is not suggested, it's old.

Have a nice day,

Jun Zhang

0 件の賞賛
返信

4,096件の閲覧回数
a_bet
Contributor IV

Hi ZhangJennie
Thanks a lot for your patience.
So I think MCUxpresso v11.1.1 should work for me also. I tried to delete the .launch as you did, but nothing changed.
One thing I noticed: your example is named "mc-sa_blinky_m4" while mine is "multicore_blinky_m4". Are we using the same LPCopen code? I downloaded mine from here and I think this is the latest available.

Best,
Andrea

0 件の賞賛
返信

4,096件の閲覧回数
ZhangJennie
NXP TechSupport
NXP TechSupport

I use demo under MCUXpresso IDE install folder:

C:\nxp\MCUXpressoIDE_11.1.1_3241\ide\Examples\LPCOpen

please try it.

4,096件の閲覧回数
a_bet
Contributor IV

Hi ZhangJennie‌,
I tried it and I'm able to debug and step through code on the M4.
One problem left is that I don't see the led blinking, and I know for sure the led itself is working since the single core blinky example works.
I now wonder if the m0app core is running.
I will make a video later as soon as I can. Do you see the led blinking by the way?

Best,
Andrea

0 件の賞賛
返信

4,096件の閲覧回数
a_bet
Contributor IV

Hi ZhangJennie
I made 2 videos, showing the errors I get as I try to debug m0sub or m0app: for the m0sub I can not halt execution, while for m0app I can not even launch the debug session. Isn't this example suppose to run from m0app? Maybe this is the reason I don't see the led blinking?
Here m0sub video, here m0app video.
I noticed that mc_sa_blinky_m4 is not configured for multicore? I'm a bit confused at this point :smileysad:

Properties for mc_sa_blinky_m4 _297.png

Thanks for the help! As I will figure out what is not working I will write down a post to explain everything:)

Best,
Andrea

0 件の賞賛
返信

4,096件の閲覧回数
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi Andrea Bettati 

This is a known issue of MCUXpresso 11.0.1. This problem has been fixed in v11.1.1. Please download the new version from here

MCUXpresso IDE|Eclipse-based Integrated Development Environment (IDE) | NXP 

Have a nice day,

Jun Zhang