Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » 4DIAC - Framework for Distributed Industrial Automation and Control » Build NXP Gpios (Problema Build GPIO NXP)
Build NXP Gpios [message #1862528] Fri, 08 December 2023 21:24 Go to next message
André Soçva is currently offline André SoçvaFriend
Messages: 83
Registered: November 2023
Member
Hi, my name is André and i have one doubt about the build of forte using the NXP Gpio. I'm using a board RT1060 and i need to control the GPIO with Forte. But i cant build the project. Can you have the configuration or some tutorial to make the build? In this link i find the files to use the module in the cmake. https://git.eclipse.org/r/c/4diac/org.eclipse.4diac.forte/+/150041/
If someone have a tutorial or the steps to make the build. Thanks.
Re: Build NXP Gpios [message #1862532 is a reply to message #1862528] Sat, 09 December 2023 16:50 Go to previous messageGo to next message
Jose Maria Jesus Cabral Lassalle is currently offline Jose Maria Jesus Cabral LassalleFriend
Messages: 16
Registered: January 2021
Junior Member
Hi,

I wrote the commit you mentioned, but as you might realized, it's very old, from 2019. I also forgot much about it, but let's see if we can bring it back to life. From what I remember, you need:

1. A board.h file which is generated from the NXP IDE where some information was provided, like the Base address of the IOs (probably of type GPIO_Type*).
2. Include the the files from the the link you posted. Download them and then check https://eclipse.dev/4diac/en_help.php?helppage=html/installation/install.html#externalModules on how to include them in to your compilation.

Try and compile it and we can see where to go from there

Also, probably some things changed in the name of the variables in the last year, so probably
Re: Build NXP Gpios [message #1862534 is a reply to message #1862532] Sat, 09 December 2023 19:30 Go to previous messageGo to next message
Jose Maria Jesus Cabral Lassalle is currently offline Jose Maria Jesus Cabral LassalleFriend
Messages: 16
Registered: January 2021
Junior Member
Sorry, if you fetch the branch directly from the link, you don't need to add the module externally.

So,
1. Get the code with:
git fetch https://git.eclipse.org/r/4diac/org.eclipse.4diac.forte refs/changes/41/150041/3 && git checkout -b change-150041 FETCH_HEAD
2. Merge the latest branch you're using.
git merge develop
3. Fix some issues:
a. src/modules/NXP/CMakeLists.txt:13 forte_add_module(NXP "NXP interface") -> forte_add_module(NXP OFF "NXP interface")
b. src/modules/NXP/nxpDeviceController.cpp:15 #include <criticalRegion.h> -> #include <criticalregion.h> (all lowercase)
4. In CMake, make sure you enable FORTE_IO and FORTE_MODULE_NXP
5. Compile
Re: Build NXP Gpios [message #1862546 is a reply to message #1862534] Mon, 11 December 2023 11:20 Go to previous messageGo to next message
André Soçva is currently offline André SoçvaFriend
Messages: 83
Registered: November 2023
Member
Hi Jose, thanks for the help. I will try this configuration.
Do you have some examples about the blocks in 4Diac? How can i make the blocks to use these commands?
Thanks.
Re: Build NXP Gpios [message #1862551 is a reply to message #1862546] Mon, 11 December 2023 17:20 Go to previous messageGo to next message
André Soçva is currently offline André SoçvaFriend
Messages: 83
Registered: November 2023
Member
Hello Jose, when i use this command, forte_add_module(NXP "NXP interface") -> forte_add_module(NXP OFF "NXP interface"), the files of NXP module dont build. That's right tihis command?
Re: Build NXP Gpios [message #1862552 is a reply to message #1862551] Mon, 11 December 2023 17:24 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1585
Registered: January 2014
Senior Member

Yes this is right, this means that per default the module is of. In your cmake conifguration you can then turn that module explicitly on per build.
Re: Build NXP Gpios [message #1862553 is a reply to message #1862551] Mon, 11 December 2023 17:25 Go to previous messageGo to next message
Jose Maria Jesus Cabral Lassalle is currently offline Jose Maria Jesus Cabral LassalleFriend
Messages: 16
Registered: January 2021
Junior Member
what errors do you get? I quickly tested against master and it compiled. I faked the methods and variables from board.h since I don't have one.

Regarding the line you mentioned, the OFF is just to call the "forte_add_module" cmake-function properly, since it has now 3 parameters. That's jsut the default value. When you configure your build in CMake you need then to enable FORTE_IO and FORTE_MODULE_NXP as mentioned in point 4
Re: Build NXP Gpios [message #1862554 is a reply to message #1862553] Mon, 11 December 2023 17:25 Go to previous messageGo to next message
Jose Maria Jesus Cabral Lassalle is currently offline Jose Maria Jesus Cabral LassalleFriend
Messages: 16
Registered: January 2021
Junior Member
perfect timing Alois haha
Re: Build NXP Gpios [message #1862555 is a reply to message #1862554] Mon, 11 December 2023 18:36 Go to previous messageGo to next message
André Soçva is currently offline André SoçvaFriend
Messages: 83
Registered: November 2023
Member
I compiled using the command without the OFF. And it worked, I can now run the forte on my microprocessor. I'm using an RT1060. The problem now is in the development of the blocks, as there are no blocks in 4Diac. I made the blocks according to what is written in the code, but I still haven't been able to access the GPIOS. I need to change something of the Service of the Adapter?

[Updated on: Mon, 11 December 2023 19:47]

Report message to a moderator

Re: Build NXP Gpios [message #1862567 is a reply to message #1862555] Tue, 12 December 2023 10:09 Go to previous messageGo to next message
André Soçva is currently offline André SoçvaFriend
Messages: 83
Registered: November 2023
Member
Hello, when i put the OFF command, even i select the FORTE_MODULE_NXP on the Cmake, the files of NXP dont compile. So i remove the OFF.
Re: Build NXP Gpios [message #1862568 is a reply to message #1862567] Tue, 12 December 2023 10:18 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1585
Registered: January 2014
Senior Member

As I wrote the OFF means that it is per default of. You should not push the automatic on in your build system. Modules can be activated or deactivated with cmake settings, e.g., cmake gui.
Re: Build NXP Gpios [message #1862570 is a reply to message #1862568] Tue, 12 December 2023 10:34 Go to previous messageGo to next message
André Soçva is currently offline André SoçvaFriend
Messages: 83
Registered: November 2023
Member
But when i select the module he dont work in the build. If i write the OFF, the build dont show the NXP modules. And when i put the mouse on the FORTE_MODULE_NXP he shows OFF to me.

[Updated on: Tue, 12 December 2023 10:36]

Report message to a moderator

Re: Build NXP Gpios [message #1862571 is a reply to message #1862570] Tue, 12 December 2023 10:34 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1585
Registered: January 2014
Senior Member

That seems strange, which 4diac FORTE version are you using?
Re: Build NXP Gpios [message #1862572 is a reply to message #1862571] Tue, 12 December 2023 10:36 Go to previous messageGo to next message
André Soçva is currently offline André SoçvaFriend
Messages: 83
Registered: November 2023
Member
I use this git fetch https://git.eclipse.org/r/4diac/org.eclipse.4diac.forte refs/changes/41/150041/3 && git checkout -b change-150041 FETCH_HEAD
Re: Build NXP Gpios [message #1862573 is a reply to message #1862572] Tue, 12 December 2023 10:40 Go to previous messageGo to next message
André Soçva is currently offline André SoçvaFriend
Messages: 83
Registered: November 2023
Member
But the real problem is the Adapter in 4Diac. Thats the problems i have with adapter.
Re: Build NXP Gpios [message #1862574 is a reply to message #1862571] Tue, 12 December 2023 10:41 Go to previous messageGo to next message
André Soçva is currently offline André SoçvaFriend
Messages: 83
Registered: November 2023
Member
Sorry Alois, i'm using the 4diac IDE 2.0.1.
Re: Build NXP Gpios [message #1862579 is a reply to message #1862574] Tue, 12 December 2023 13:14 Go to previous messageGo to next message
André Soçva is currently offline André SoçvaFriend
Messages: 83
Registered: November 2023
Member
One question about the forte architecture to run in NXP. In my application, i'm using freeRtos with Lwip and I try to test embrick and wago, and the Cmake show to me about linux architecture to run in 4Diac. There's something about it?
Re: Build NXP Gpios [message #1862588 is a reply to message #1862579] Tue, 12 December 2023 19:34 Go to previous message
André Soçva is currently offline André SoçvaFriend
Messages: 83
Registered: November 2023
Member
thanks for the help, i solve the problem.
Previous Topic:4diac FB testing
Next Topic:Float to text conversion
Goto Forum:
  


Current Time: Sun Apr 28 07:27:21 GMT 2024

Powered by FUDForum. Page generated in 0.04425 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top