MQX v4.1 flexcan compile errors

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MQX v4.1 flexcan compile errors

1,781 Views
jamesmonczynski
Contributor II

I am trying to upgrade a project from MQX v4.0 to v4.1.

I have handled all the new pointer stuff.

I am now on flexcan.

I cannot figure out why I am getting compile errors on my project AND the example flexcan project.

From Example project:

pastedImage_0.png

I have based my custom board off of the K70 tower.

Something I did notice.

With MQX 4.0, K70 twr bsp, I am able to create an example program for flexcan. Compile, link, no probelms.

With v4.1, the K70 twr bsp no longer contains an example program for flexcan.

But my custom board, cloned from K70 tower, does have an example program for flexcan. This is the example I am having problems with.

Has anyone else had this problem?

Thanks for any help.

0 Kudos
12 Replies

1,268 Views
DavidS
NXP Employee
NXP Employee

Hi James,

Please note there is a MQX4.1.1 update.

I looked at release notes and do not see any issue for compiling.  There was note about hardware issue with TWR_K70F120M as follows:

FlexCan Driver Issues

Several issues are identified during the development of the FlexCAN driver: On TWR-K70F120M board, the TX/RX signals

are not routed to the elevator by default and the FlexCAN example does not work. To enable the FlexCAN operation, solder

the zero-ohm resistors, R22 and R23, on TWR-K70F120M board. The 10-kbit baudrate doesn‟t generally work. FlexCAN

detects bit0 errors in its own transmitted messages.

In MQX4.x the FlexCAN demo is the only example and is in the MQX4.1.1/mqx/examples/can folder path.

I loaded this example using CW10.6 and MQX.4.1.1 and the GCC compiler and build without error.

Console output:

**** Build of configuration Int Flash SramData Debug for project fsl_flexcan_twrk70f120m ****

"C:\\Freescale\\CW MCU v10.6\\gnu\\bin\\mingw32-make" -j16 all

'Building file: C:/Freescale/Freescale_MQX_4_1_0_GA/mqx/examples/can/flexcan/fsl_flexcan_test.c'

'Executing target #1 C:/Freescale/Freescale_MQX_4_1_0_GA/mqx/examples/can/flexcan/fsl_flexcan_test.c'

'Invoking: ARM Ltd Windows GCC C Compiler'

"C:/Freescale/CW MCU v10.6/Cross_Tools/arm-none-eabi-gcc-4_7_3/bin/arm-none-eabi-gcc" "C:/Freescale/Freescale_MQX_4_1_0_GA/mqx/examples/can/flexcan/fsl_flexcan_test.c" @"Source/fsl_flexcan_test.args" -MMD -MP -MF"Source/fsl_flexcan_test.d" -o"Source/fsl_flexcan_test.o"

'Finished building: C:/Freescale/Freescale_MQX_4_1_0_GA/mqx/examples/can/flexcan/fsl_flexcan_test.c'

' '

'Building target: C:/Freescale/Freescale_MQX_4_1_0_GA/mqx/examples/can/flexcan/build/cw10gcc/fsl_flexcan_twrk70f120m/Int Flash SramData Debug/fsl_flexcan.elf'

'Executing target #2 C:/Freescale/Freescale_MQX_4_1_0_GA/mqx/examples/can/flexcan/build/cw10gcc/fsl_flexcan_twrk70f120m/Int Flash SramData Debug/fsl_flexcan.elf'

'Invoking: ARM Ltd Windows GCC C Linker'

"C:/Freescale/CW MCU v10.6/Cross_Tools/arm-none-eabi-gcc-4_7_3/bin/arm-none-eabi-gcc" @"fsl_flexcan.args" -o"C:/Freescale/Freescale_MQX_4_1_0_GA/mqx/examples/can/flexcan/build/cw10gcc/fsl_flexcan_twrk70f120m/Int Flash SramData Debug/fsl_flexcan.elf"

'Finished building target: C:/Freescale/Freescale_MQX_4_1_0_GA/mqx/examples/can/flexcan/build/cw10gcc/fsl_flexcan_twrk70f120m/Int Flash SramData Debug/fsl_flexcan.elf'

Hope this helps.

Regards,

David

0 Kudos

1,268 Views
ankurrahi
Contributor II

Hi David,

I am using TWR_K70F120M with MQX 4.1.1. Iam trying to debug its sample example of CAN (FlexCAN). I have already sorted both R22 and R23 resistors. still I am not getting any ouptut on terminal. The output I am getting is shown below....

can.jpg

R22 and R23 is connected to PTC16 and PTC17 pins respectively. The same PTC16 and PTC17 pins can be used for NAND Flash as mentioned in schematic diagram. Do i need to open both R342 and R343 resistors for disabling the NAND Flash.

Any help will be highly appreciated

Regards

Ankur

0 Kudos

1,268 Views
DavidS
NXP Employee
NXP Employee

Hi Ankur,

Please check this post: Anyone know an easy way to enable old flexcan driver over the new fsl_flexcan?

See if that helps.

Regards,

David

0 Kudos

1,268 Views
jamesmonczynski
Contributor II

Thanks David, but for some reason 4.1.1 just does not work correctly on my system.

I am able to create a new MQX 4.0 flexcan project, with my custom board (twrk70f120m with some pin changes), compile/link with some minor warnings.

I am able to create a new MQX 4.1 flexcan project, with same cloned custom board (cloned using 4.1 wizard now), compile with the above errors and warnings.

I noticed when creating, I no longer get the selection for GCC or Freescale compiler. I don't know if they just force GCC or what, because I know the Freescale compiler is out the door.

To me, it looks like the Freescale compiler is active, instead of GCC, which looks like it would generate the above errors.

I have uninstalled 4.1 and re-installed 4.1.1 (FSLMQXOS_4_1_1_GA.exe), multiple times (because of some WEIRD errors), but I won't go into those in this thread.

So, I am still stuck with missing CAN defines and prototypes.

0 Kudos

1,268 Views
DavidS
NXP Employee
NXP Employee

Hi James,

Maybe something has gotten hosed in the Cloning process.

Can you try to load the TWR-K70F120M IAR workspace from:

C:\Freescale\Freescale_MQX_4_1_1_GA\build\twrk70f120m\iar\build_libs.eww

Do full build of the RTOS.

Then load the flexcan project:

C:\Freescale\Freescale_MQX_4_1_0_GA\mqx\examples\can\flexcan\build\iar\fsl_flexcan_twrk70f120m
\fsl_flexcan_twrk70f120m.ewp

I like this approach since I can (no pun intended!) have the RTOS and MQX application opened and play with each without having to ping pong workspaces.

Will this compile without errors?

I've just tested this process with IAR7.20.  What version are you using?

Regards,

David

0 Kudos

1,268 Views
jamesmonczynski
Contributor II

We are using the GCC compiler. I would like to use IAR, company has not bought it yet.

I did not find a problem with 4.1.0 BSP cloning wizard, but I did find a problem with 4.1.1.

From my newly generated SR 1-2402761352:

1. Uninstalled 4.1.0 completely, deleted leftover folder.
  (Copied contents to another folder fo comparison)
2. Installed 4.1.1 (FSLMQXOS_4_1_1_GA.exe), default everything.
3. When done, use wizard to try cloning twrk70f120m as UniversalTester.
4. Get error cannot find "C:\Freescale\Freescale_MQX_4_1\tools\CodeWarriorNPW\UniversalTester_32.reg". Cannot use BSP made.
5. Did this multiple times until I saw error in log, "Cannot find C:\Freescale\Freescale_MQX_4_1\tools\generator\records\mqx_records\globals_full.yml". There is no globals_full.yml (4.1.0) but a globals.yml(4.1.1) is located at location.
6. Copied globals.yml to globals_full.yml
7. Ran BSP clone, NOW it worked.


This just go me back to where I was before with the MQX 4.1.0 and the CAN errors.


I have also tried to create an example program for flexcan using just the standard twrk70f120m board and there is NO flexcan example available.

It is weird because I used that board, untouched (no changes made, yet), to clone my custom board and the custom board has the flexcan example available.

0 Kudos

1,268 Views
DavidS
NXP Employee
NXP Employee

Hi James,

Sorry for the IAR tangent....I was answering too many questions at same time and my brain crossed threads.

Can you do the above process of opening the TWR-K70F120M RTOS in CW10.6, compile for debug target, open the flexcan MQX application and compile it successfully?

I'm trying to determine if the issue is a Cloning problem or MQX.4.1.1 installation problem, or environmental, or other.

I did successfully compile with CW10.6.

Regards,

David

0 Kudos

1,268 Views
jamesmonczynski
Contributor II

Installed 10.6.

I brought in the twrk70f120m board and compiled, minor warning.

New 4.1 project, no flexcan example project for twrk70f120m seen.

Navigated over to C:\Freescale\Freescale_MQX_4_1\mqx\examples\can\flexcan\build\cw10gcc. Imported fsl_flexcan_twrk70f120m.

Compiles and links, no problem.

But, this is not the flexcan that I used in MQX 4.0, this is fsl_flexcan and I used just plain old flexcan.

Function-wise, they are different.

It looks like I would have to re-write all my CAN tasks to now use the fsl_flexcan way, instead of the flexcan way.

Do you know who, what, why differences between the two? I REALLY don't want to re-write the 4.0 CAN tasks, they work so well :smileyhappy:

0 Kudos

1,268 Views
DavidS
NXP Employee
NXP Employee


Hi James,

It does appear that new driver code was added from MQX4.0 to MQX4.1.

It looks like the "old" driver code is still present.

I'm asking if its as simple as removing the new and replacing with the old and re-compile the BSP.

Hope to know more tomorrow.

Regards,

David

0 Kudos

1,268 Views
jamesmonczynski
Contributor II

Yes, I noticed it is still present, also.

It just doesn't look like it is "enabled" for the k70.

I have tried bypassing the MQX setup and including what I need, but I still run into road block errors.

I will start looking at the new way to handle CAN also, since my CAN modules are are kind of plug and play with the application.

Its just that I was not expecting to update CAN functionality by updating MQX version.

What I needed was some other new processor functionality (flash swap on a K70 derivative) that 4.1 provides.

0 Kudos

1,268 Views
jamesmonczynski
Contributor II

I submitted an SR on this and was told to to do just that.

I have started another thread (forgot about this one) to address disabling the new fsl flexcan driver and enabling the old flexcan driver.

I am still having problems.

Anyone know an easy way to enable old flexcan driver over the new fsl_flexcan?

0 Kudos

1,268 Views
jamesmonczynski
Contributor II

I'm currently using 10.5, so I'll have to DL and try.

That was my next thing to do, based on what I saw in your replies:

""C:/Freescale/CW MCU v10.6/Cross_Tools.."

0 Kudos