This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Ubuntu Linux inat-tables.c Issue in CCS 10

Hello,

I apologize in advance, as I am not the most Linux-savy person. This is my first big project using Ubuntu and only my second using Linux.

I am in the process of adapting some code that hasn't been touched in 5 years that originally ran on an Advantech mini PC (using a custom, modified version of Ubuntu) but now needs to run on an Intel Nuc running Ubuntu (ver 20.04 currently). This code is in generic C. I decided to use CCS for the debugging tools to run and understand it cause I am very familiar with the IDE on Windows.

I began by creating a new C project (not CCS project) in CCS and copying the contents of this code into the project. I was able to get the program to build but noticed that an error relating to linux/firmware.h in the TI USB Driver 3410 file was popping up. I got around this by going into the project directory and creating a symbolic link to the headers in the kernel folder. This was originally with kernel 4.13, and I was getting an error relating to classmap.h not being found. I then tried this with kernel 4.15 and 5.4.0-86-generic, and am now receiving the error below...

1108 | [0x3b] = INAT_MAKE_IMM(INAT_IMM_BYTE) | INAT_MODRM | INAT_VEXOK | INAT_EVEXONLY,
| ^~~~
../ClusterheadTest/Driver/linux/tools/objtool/arch/x86/lib/inat-tables.c:1108:3: note: (near initialization for ‘inat_escape_table_3_1’)
../ClusterheadTest/Driver/linux/tools/objtool/arch/x86/lib/inat-tables.c:1109:3: error: array index in non-array initializer

CCS doesn't like the way that inat-tables.c defines the map arrays.

I can't tell if this is an error in how my CCS environment is set up or a genuine issue with the Linux kernel version 5.4.0-86-generic that I am using. My goal is just to get the project to build for now, so I can then adapt the code for the MSP432 instead of the previously used MSP430.

I can share the project if needed for debugging.

Thanks in advance for any help,

Greg

  • Small update. I now have a CCS Project version that I created by copying source and driver files into. That version now gives me an error...

    /usr/bin/ld: main.o: relocation R_X86_64_32 against ',rodata' can not be used when making a PIE object; recompile with -fPIE

  • Gregory,

    So if I follow this correctly you are attempting to build a Linux driver that communicates with an MSP430 (to be replaced with 432)?  So the build errors are coming from whichever version of GCC you are using to build the Linux code?

    Just trying to figure out who to direct this to for assistance.  

    Regards,

    John

     

  • Hi John,

    First off, thanks for the response!

    I'll give some more context on the project just in case it helps lead this in the right direction. The purpose of the program was to route serial traffic from a MSP430 to a SQL page. We have been in the process of upgrading from the MSP430 to the 432 to receive data over WiFi and send that to the SQL page through this program. Now that we have the 432 project almost complete, I am hoping to be able to adapt this code so we don't have to write it all from scratch.

    I'm not trying to build the Linux driver. The errors seem to be coming from a pre-existing driver. Until now, I assumed this was supplied by TI, but now looking at the source code, I am not sure. I have only been on the team for 2 years, and we consistently rotate members. Due to a lack of documentation, I don't have too much information on this legacy application.

    The driver in question is a TI 3410/5052 USB serial Driver. I know that it worked, in its current condition, about 5 years ago, but that was also on a different piece of hardware. This file was the source of the initial linux/firmware.h error I was receiving.

    Having played around with my project/workspace configurations, I'm not too sure if this an error with my Linux distro (currently using Ubuntu 20.04) or some kind of CCS settings issue. I seems to be receiving all these errors inside the kernel files (in both the original post and the small update), which I figure should not be causing any problems after I made sure to update everything.

  • We (CCS team) won't be able to help much with this.  Really for building on an x86 Linux host we don't do anything special.  CCS includes Eclipse/CDT so the build system is there for using an x86 GCC is present.  Basically the "C Project" you located can be used for that.  However the build error would be coming from the GCC tools being used.  I can try looping in the team that supports the 3410 as they may be able to help with getting things going.

    Regards,

    John