BUG: Pin Expert losing critical data!

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

BUG: Pin Expert losing critical data!

2,896 Views
davenadler
Senior Contributor I

Kinetis Expert, PC version, *** About NXP Configuration Tools: Installed tools: Pins (2.0) Clocks (1.0)

Yesterday I used Pin Expert, exported pin_mux.h and pin_mux.c, and saved MEX file.
Project built and ran perfectly.

 

Today I use the same MEX file, but many pin names are missing.
For example the symbol BOARD_INITMFW2_POWER_RAIL_ON_OFF_GPIO.
If I export the c/h files, my project no longer builds!

 

If I start Pin Expert and import yesterday's working pin_mux.h and pin_mux.c files,
it does not import many definitions including BOARD_INITMFW2_POWER_RAIL_ON_OFF_GPIO.

 

In the attached ZIP are the generated files from yesterday (which are OK), and the MEX file (which if loaded seems to have lost lots of definitions).

 

HELP!!!
Thanks,
Best Regards, Dave

 

PS: To easily reproduce problem: Import the pin_mux.c/h files, then export.
Compare the input and output files to see all the lost information.

Original Attachment has been moved to: uC_setup_20170126_working.zip

Labels (1)
Tags (1)
0 Kudos
22 Replies

1,962 Views
liborukropec
NXP Employee
NXP Employee

Hello Dave,

could you post here the log files (or use PM) from your <home directory>/.nxp/swtools.log and <home directory>/.nxp/nxp_conf_workspace/.metadata/.log if there's any clue what happened?

Do you have the previous version of working pin_mux.c ?

Best regards,

Libor Ukropec

0 Kudos

1,962 Views
davenadler
Senior Contributor I

Hi Libor - I have attached the log files you requested.

I'm not sure what you mean "working pin_mux.c"; the version I have sent builds and runs perfectly. Problem is buggy Pin Expert cannot import the file.

Can you confirm you have reproduced the problem as follows?
1) Start Pin Expert with no MEX or template.
2) Import the pin_mux.c/h files I sent, then export.
3) Compare the exported files to the ones I sent to see all the lost information.
Thanks,
Best Regards, Dave

PS: Have you talked to Carlos Mendoza, who is working on the related ticket case#00102417?

0 Kudos

1,962 Views
liborukropec
NXP Employee
NXP Employee

Hello Dave,

unfortunately the logs are not helpful. I did not reproduced the issue and let me explain more. There are 3 files. C, H and MEX. When you configure the label(s) and export source files for Pins, both files are affected. C has the YAML part with the labels definitions (used for import when you do not have MEX file for any reason) and the H with the defines (not used for import). What I can see is that your C file does not have corresponding YAML lines with the labels that are in the H file. It seems to me like either bug in the tool or that the C file is newer (older) that the H file.

That's why I asked, if you have"previous" C file, that could contain the definition of the labels in the YAML. The MEX file correspond with the C file (missing the labels). That's why when you import the C file, the labels are not there.

If you work with Eclipse and if you exported the sources more times, the previous versions of the file can be accessible using popup menu on the file "Compare with | Local history..." - just in case you did it more times.

Note: I have not talked with Carols yet, I'll do tomorrow if it will be possible,

Regards,

Libor

0 Kudos

1,962 Views
davenadler
Senior Contributor I

OK, the above means buggy Pin Expert problems are on the "export" side.
My last updates were captured in the GUI and then:

  • pin_mux.c/.h code was exported OK, but...
  • YAML in pin_mux.c was missing lots of definitions, and
  • MEX file also was missing lots of definitions.

I've attached the last pin_mux.c that appears to have complete YAML (prior my latest edits). You should be able to reproduce the problem by:

  • diff the pin_mux.c/.h with the "final" version and make a list of the all additional definitions and settings.
  • import the pin_mux.c attched below (prior the edits that blew up Pin Expert)
  • add all the additional definitions and settings
  • do an export and save the MEX - should show same bug...

Hope this helps and please try to get this fixed soon (its been a week now)!
Thanks,
Best Regards, Dave

0 Kudos

1,962 Views
liborukropec
NXP Employee
NXP Employee

Hi Dave,

we identified the problem when importing source for Pins tool when the MEX configuration is based on the board, where there are already the predefined labels. In this case the "user overwritten" labels are lost. I've restored your MEX file from your C file, please see attached file. For now until the new version is released you should avoid the importing the sources and stay using the MEX configuration file for working with your project.

If you need more help please let me know.

Regards,

Libor

0 Kudos

1,962 Views
davenadler
Senior Contributor I

Libor we are really not making progress here!

  1.  The "restored MEX file" you have provided is unusable because:
    1. You have lost the clock setup that was in the MEX file.
      Trying to generate the clock configuration sources yields:
      pastedImage_1.png
    2. The MEX file you sent does not contain the new definitions in the latest .c/.h file I provided you.
      Generating pin_mux sources from your MEX and diff'ing the resulting files with the source files I sent you shows these missing definitions:
      /* PORTD7 (number 100), LED_RED_LOW_BATTERY */
      /* PORTD6 (number 99), LED_BLUE_BT_STATUS */
      /* PORTD5 (number 98), LED_DIAGNOSTIC_GREEN */
      /* PORTD4 (number 97), LED_DIAGNOSTIC_YELLOW */
      Please, please, please, check your work!
  2. The bug you have identified above does not match my usage:
    I did not use "import", I simply started the tool the next day using the MEX I had used before.
    No multiple projects, no import, just continuing the previous days work!

Please, get the developer involved, find and fix the bug that has caused this problem, and provide me with a complete MEX that contains all my definitions and works with the fixed tool! As it sits now, we have to conclude these tools are unusable for use on real projects!

Thanks,
Best Regards, Dave

0 Kudos

1,962 Views
davenadler
Senior Contributor I

Also, please find attached my attempt to manually merge the yaml into complete files.
Unfortunately, Pin Expert imports this file without any messages in the log, but ignores all the labels etc...

Please, please, please fix this stuff!

Thanks,
Best Regards, Dave

0 Kudos

1,962 Views
liborukropec
NXP Employee
NXP Employee

Hello Dave,

you were right, I created MEX just from one version of the pin_mux.c and not from the clock_config.c, also I did not merged the previous pin_mux.c with the rest of pin signals (sorry for that). Your merged sources helped a lot to recover the MEX file - see attached. I'm able to export all sources with identical content except one cosmetic difference.

Unfortunately I did not reproduce the behavior when the pin signals are lost just with restarting of the tool. We'll analyze more scenarios if it's reproducible on our side. If you reproduce it again we will appreciate any detail for reproducing this issue. I can also provide hot-fix for importing source with YAML if needed.

Note: Back to your previous post - the clocks tool is not able to export its sources until it is at least once activated using the menu "Tools". This is already improved for the next version of the tool.

Regards,

Libor

0 Kudos

1,962 Views
davenadler
Senior Contributor I

Today Pin Expert again lost a bunch of definitions.

Meanwhile NXP tech support has closed the related ticket without resolving the problem.

Working with the MEX you provided last time, I did the following:
- "Save As..." to a new MEX file name

- re-order the pin-group tabs at the bottom of the screen

- connect one ADC input

- export pin.c/.h

Again, lots of definitions have gone missing.
I have attached ZIPs of before and after file sets (MEX,*.c,*.h).

Are you able to:
1) Fix my MEX so it has all the definitions, and

2) provide an updated tool EXE with fixes to this problem?

As this stands, Kinetis Expert is utterly unusable for real work!
And I actually have some real work to get done, for a real product!

Thanks,
Best Regards, Dave

0 Kudos

1,962 Views
liborukropec
NXP Employee
NXP Employee

Hello Dave,

I've restored your project, doing the same tasks as you did (drag&drop functions, route the pins) and unfortunately I did not reproduce the issue. For now please find attached the MEX file.

Regards,

Libor

0 Kudos

1,962 Views
davenadler
Senior Contributor I

Libor - Here is how to simply reproduce MEX file corruption by Kinetis Expert Tool:

  1. Open "fixed" MEX you just sent to me.
  2. select tools clock
  3. select tools pin
  4. NOTE: for some reason, "*" (modified flag) now appears next to MEX name in window caption, even though no changes have been made.
  5. Export pins source (exported source files look OK)
  6. Export Clocks source (exported source files look OK)
  7. NOTE: Look at InitMFW2 pin 57: note (correct) label BT121_BOOT
  8. Save MEX (it is now corrupted)
  9. Exit Expert tool

You can now see that the MEX file has lost some of my names:

  1. Restart tool and load the "FIXED.MEX" that you just saved above
  2. pin 57 name is now gone

Please:

  1. confirm you can reproduce the MEX corruption
  2. tell me how long it will take to fix this! This is embarrassing!

Thanks!
Best Regards, Dave

0 Kudos

1,962 Views
liborukropec
NXP Employee
NXP Employee

Hi Dave,

I reproduced the issue, even with different steps; still your steps helped me to find how to reproduce - going to clocks tool and do a change (e.g. check and uncheck ENET 1588 clock input) and save the MEX => pin labels are lost.

I'll be back to you Tuesday/Wednesday with the hot fix. Sorry for any inconveniences.

Best regards,

Libor

0 Kudos

1,962 Views
davenadler
Senior Contributor I

Hi Libor - Pin Expert corrupted the data without my changing anything. Perhaps it is only necessary to select back and forth between clock expert and pin expert...

Can you build the tool for 32-bit target? That way it can run on both 32-bit or 64-bit Windows.

Looking forward to the corrected tool!
Thanks,
Best Regards, Dave

0 Kudos

1,962 Views
liborukropec
NXP Employee
NXP Employee

Hi Dave,

we prepared the update site with hot fix for MCUXpresso Config Tools v2. For now it is not available generally to everyone, these steps are needed to perform:

1) open the <installdir>/bin/tools.ini (make a backup in advance please) and find the line (use other editor than notepad.exe in case there will be problems with CR/LF):

-Dupdate.site=http://kex.nxp.com/staticdata/updates/kex_2.0/

and replace by this content:

-Dupdate.site=http://kex.nxp.com/staticdata/updates/kex_2.0Beta/

2) start/restart the tool

3) In main menu select "Help | Check for updates" and install offered update

4) restart the app after the update is finished.

The update is platform independent (Win 32/64, Linux), or better it contains versions for all supported platforms.

Regards,

Libor

0 Kudos

1,962 Views
davenadler
Senior Contributor I

Thanks Libor, I have downloaded the hotfix. Bugs so far:

  1.  open the MEX, select clocks tool, and click on different clock tab.
    I have made no changes, but...
    Changed marker "*" is shown in caption bar.
    No changes have been made; is something again corrupted?
  2. Export pin code. Lots of stuff is missing in pin_mux.h, including entire ethernet setup:
    void BOARD_InitENET(void);
    all RMII pins
    All this is visible in the pin tool but missing in generated code.

At least now I can save the MEX and restart the tool without stuff going missing.
But, things are missing in the generated code (you can compare to earlier generated code you imported).

Can you take a further look at this please?
Thanks,
Best Regards, Dave

0 Kudos

1,962 Views
liborukropec
NXP Employee
NXP Employee

Hi Dave,

ad 1) the asterisk (dirty) flag was not part of the fix, as it is not a critical bug - it will be fixed in the new version of the tools (version 3.0)

ad 2) I took the fixed MEX file and used in in the v2.0 tool and also in the updated tool for export sources, the pin_mux.* files were the same. When I tried to compare to your pin_mux.* files from the 20170213_snapshot_AOK.zip I had to re-order the pins functions and except one define they were basically the same.

Could you please double check the defines are missing and if yes, post here the old pin_mux.* and the new pin_mux.* files?

Thank you and regards,

Libor

0 Kudos

1,935 Views
davenadler
Senior Contributor I

Apologies Libor, you are right, only difference was ordering, so looks OK.

Last point: How do I get a 32-bit Windows executable that installs and runs these tools?

I find only 64-bit here:

http://www.nxp.com/products/wireless-connectivity/2.4-ghz-wireless-solutions/ieee-802.15.4-plus-ble/...

Thanks!

Best Regards, Dave

0 Kudos

1,935 Views
liborukropec
NXP Employee
NXP Employee

Hi Dave,

glad to hear no more problems with the Pins for now. The 32bit version is quite hidden, you have to click on the "More" bellow the list of installers on the page you provided to see all options. This should be the direct link to the installer, hope it will work for you: https://www.nxp.com/webapp/Download?colCode=KINETIS-OFFLINE-EXE-86&appType=license&Parent_nodeId=139...

Regards,

Libor

0 Kudos

1,935 Views
davenadler
Senior Contributor I

Thanks Libor, I was able to download/install/update the 32-bit version.
Quite well hidden though!
Thanks,
Best Regards, Dave

0 Kudos

1,962 Views
vicentegomez
NXP TechSupport
NXP TechSupport

Hi Dave

Your case was close due 7 days without activities, but you can open any time, actually you already did.

Regards

Vicente Gomez 

0 Kudos