Parsing NMEA GGA Sentences - make in PSoC Creator

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
TeMa_1467596
Level 5
Level 5
5 sign-ins 5 likes given First like received

I am reading an NMEA string via a UART and I want to parse the string into data elements.  My web searches show that NMEA has libraries to do just this GitHub - jacketizer/libnmea: Lightweight C library for parsing NMEA 0183 sentences  in GCC but they need a make to get them into the GCC directory structure.  Can someone either:

a. Provide unpacked NMEA library files or

b. Explain how to run make from PSoC Creator so I can use these files.

Just trying not to reinvent the wheel.

0 Likes
1 Solution

Ted,

You cannot run the make suggested in the Github in PSoC Creator. To run the make suggested in the Github page, you need the below -

1. Linux/Unix system

2. If you have windows, then you need Cygwin or Linux for windows (available for Win 10 in the marketplace for free) or Virtual machine running Linux.

3. MacOs

Now, if you have any of the above, then you should be able to simply follow the instructions in the Github i.e. you can run the "make install" in the bash tool inside the directory where you have downloaded all the files. After running the make, the libraries will be available in the mentioned folder. Note that the library you generate from the make instruction is going to be generic C library and might not be useful for an Arm core For that you will need to have a GCC cross-compiler for generating the lib for Arm Cortex devices. Once you do all that and have the library generated for Arm devices, then the lib can be used in PSoC Creator as an external library in the linker settings.

If you are new to this, then this might be a bit overwhelming. That said you can still download the "src" folder from the page you provided and include them in your PSoC Creator project . Make sure the headers are linked properly (i.e. place them inside project folder and provide the "include paths" in the compiler settings). This will let you compile the code in PSoC Creator.

Regards,

Meenakshi Sundaram R

View solution in original post

0 Likes
5 Replies
GeonaP_26
Moderator
Moderator
Moderator
250 solutions authored 100 solutions authored 50 solutions authored

To export your PSoC Creator design to a Makefile, goto Project > Export to IDE > Makefile. For more details, please refer section: Exporting a Design to Makefile.

0 Likes

If you click on my link, you'll see that the files provided are not in usable form, i.e. there are not .c and .h files.  Instead, the authors want you to run makefile to create the .c and .h files in a given folder - that's the problem I am trying to figure out how to do in PSoC Creator, how to take the files offered by the nmea and use them in a PSoC Creator project.

This may be overtaken by events, I have found this https://majerle.eu/documentation/gps/html/index.html which includes .c and .h files for a GPS nmea decoder that includes the GGA message which is what I need.  I'm going to try this today but understanding how to run the nmea makefile would still be useful.

Ted

0 Likes

The current option to use Makefile in PSoC Creator has been explained in  above interaction.You can check topic"

Building PSoC 6 Designs with Make" in PSoC Creator4.2 Help Section

You can try adding directly .c and .h directly in creator

0 Likes

Either I'm completely stupid (most likely) or the makefile you're talking about is not the same as the one I asked about.

The NMEA offers us code that is operated upon by their makefile command to extract and generate the .c and.h files and I suppose this applies to people who use GCC without an IDE who would type such commands into a DOS-like environment.  Given that Cypress has wrapped their IDE around GCC, I'm unable to figure out how to get inside that wrapper so I am unable to unpack and use the NMEA code.

Thanks for your help anyway.

Ted

0 Likes

Ted,

You cannot run the make suggested in the Github in PSoC Creator. To run the make suggested in the Github page, you need the below -

1. Linux/Unix system

2. If you have windows, then you need Cygwin or Linux for windows (available for Win 10 in the marketplace for free) or Virtual machine running Linux.

3. MacOs

Now, if you have any of the above, then you should be able to simply follow the instructions in the Github i.e. you can run the "make install" in the bash tool inside the directory where you have downloaded all the files. After running the make, the libraries will be available in the mentioned folder. Note that the library you generate from the make instruction is going to be generic C library and might not be useful for an Arm core For that you will need to have a GCC cross-compiler for generating the lib for Arm Cortex devices. Once you do all that and have the library generated for Arm devices, then the lib can be used in PSoC Creator as an external library in the linker settings.

If you are new to this, then this might be a bit overwhelming. That said you can still download the "src" folder from the page you provided and include them in your PSoC Creator project . Make sure the headers are linked properly (i.e. place them inside project folder and provide the "include paths" in the compiler settings). This will let you compile the code in PSoC Creator.

Regards,

Meenakshi Sundaram R

0 Likes