Hello Everyone,
I am using FreeMASTER for a touch tunning exercise for the MKE15Z micro-controller.
I used the sample project which is available with SDK and it works well.
Here are the below snapshot of it's working.
But due to some reason I wanted to create a new FreeMASTER project from scratch, with just visualization part, no other information.
The idea is to create an oscilloscope view for each electrode without other information.
But it's not working.
The following images show the comparison, left side is working and right side is not working one.
The following image shows the variable, although I used the same *.out file in both the projects, the same variables are used but in the working project, variable addresses are shown but in not working one it is not shown.
In the project which is not working, if I used a variable which is having a fixed address it works, as shown below.
Here I added a "millisecond" variable which I increment in 1ms SysTick interrupt and this works well.
Can someone help me in understanding and how to fix this problem?
Why with the custom project it is not working, and why this is not able to detect the touch-related variables in one project and why working in the other?
PS: I have clicked reload symbol file several times, but even this doesn't work.
Thanks in advance.
Solved! Go to Solution.
I have some bad news - the Touch library uses a pseudo-dynamic allocation to create runtime structures with electrode data. It uses a small memory pool and a simple memory allocator for this purpose. From the FreeMASTER point of view, the only thing which is static at fixed address in memory is the nt_kernel_data, all other structures have dynamic address (fixed after allocated, but not known in compile time). The El_xx structures that I originally thought would be usable in FreeMASTER are just ROM-based configuration structures.
I'm afraid that it is inevitable to use a script that reads the nt_kernel_data and related memory and dynamically creates FreeMASTER symbols and variables. I'm sorry for the confusion and false hope I gave above.
If using existing scripts and the Internet Explorer is not an option for you, we will need to rework the script from ActiveX to JSON-RPC and make it working in the Chrome environment (more about these technologies in this video). This rework will take more time, I cannot give any commitments.
However, there is one thing you can do in the target MCU application to make it working. It is more a "hack" and needs some work, but it is better than nothing. The idea is simple: "If FreeMASTER script cannot do the job, so let's use the MCU application to help". The MCU app would somehow store the "dynamically" allocated data to static variables accessible by FreeMASTER.
I know this not a nice solution and I don't expect you will be happy about it :smileysad:
Regards,
Michal
Thanks, MichalH
For your support.
At least I learned about the "valueof", and I will use this.
Thanks, and Regards
Hello,
if the variable properties dialog does not show any resolved symbol address, the problem is most likely in the .out ELF file path or type. Please go again to the Project Options (Ctrl+T) to the "MAP Files" tab. The OUT file should be specified there and should be "Binary ELF ..." type.
To make sure the symbols are loaded correctly, press the "View" button. You should get a listing of all C symbols parsed from the ELF file.
If this does not help, it is also possible that your project uses a TSA runtime symbol tables embedded directly in the microcontroller application. Do you use the same application as in the first case which is working or have you created a new one?
Regards,
Michal
Hi MichalH
Thank You for your quick response.
I am using the same *.out file in both FreeMASTER's projects (*.out file is generated by IAR and I think it is equivalent to *.elf file).
I also checked the "List of all Valid symbol files", and they both are the same for both FreeMASTER Projects.
Both the files are attached at the bottom.
Apart from this, I am not using RS232/Serial and FreeMASTER drivers, I am using J-Link to plot this data on the oscilloscope view.
In the not working project at the startup, I get this error.
Here I clicked on the checkbox "Access the variables anyway at their last-known addresses"
My question is if we see the FreeMASTER Working project the value of the variable "electrode_usafa_0_baseline" is "nt_kernel_data.modules[0]->electrodes[0]->baseline"
And I put the same value in my custom FreeMASTER project, but it is not working.
Why FreeMASTER able to find the address in the project available with NXP SDK but not with my custom FreeMASTER project.
Is there something which I am missing.
Updated:
In the above update, I mentioned that when I opened the project (custom FreeMASTER project) I get the Missing Symbol Definition, which I didn't get in the FreeMASTER project which is working, I found the reason that this is warning is disabled with the FreeMASTER project provided with the NXP SDK, as shown below.
Left Side is Working Project (NXP SDK) and right side custom project.
And after checking this option, in the working project, I also get the same message in the project which is working, and even though it works fine.
I will keep this post updated.
Hello,
I think the magic of why the original project works well is hidden in the control page JavaScript code. The FreeMASTER project for Touch Sensing applications needs to be quite universal as it needs to handle different electrode and touch controls configurations and structures. The author of the UI project did not want to depend on how each electrode and control structure is named.
I'm not sure, but I think that the script takes just the root pointer named nt_kernel_data. Then it reads the pointer value and walks through the chains of other linked lists and defines all necessary symbols and variables dynamically using DefineSymbol and DefineVariable methods. Then it uses the variables to generate Oscilloscope graphs also dynamically.
In your new fresh project, you do not have the script thus you also do not have the symbols defined.
Regards,
Michal
Thanks, MichalH for your response.
Does this mean that I can't use these variables in a standalone project?
I will explain to you the reason why I need a separate project.
If you remember a few months back I created a post in the FreeMASTER project.
NXP Touch Tuning not Opening Properly in FreeMASTER
The touch tuning project doesn't work on my laptop (office) due to some company policies.
That's why I thought to create a separate project.
Is there some way, to solve this problem?
Or is it possible in FreeMASTER to get the data from a particular memory address, I will specify the type of data and it's size manually?
Please let me know if this is possible, thanks in advance.
I think this should be possible. All Electrode structures are available in memory as global symbols - this means FreeMASTER is definitely able to visualize them. I'm not sure if the Touch library makes any dynamic allocations - in this case it would be problematic (but also solvable I think).
The reason why the original project does it such a difficult way is that it needs to be ready for any configuration. The information about which electrode is assigned to what control is generally unknown and must be parsed by reading nt_kernel_data live data.
In your project, you will probably have a fixed electrodes, fixed controls and static assignments, so you will be able to visualize the signals directly from El_0, El_1 and other structures. I'm not an expert on this technology, so I cannot give an advise on what structure members are to be monitored (baseline etc.). Please try it this way and let me know. I would contact an owner of the Touch project here to reach out for more information if needed.
Thanks,
Michal
Thanks, MichalH for your response.
Yes, this is true that all the Electrode structure in memory is global.
For the touch project, the following information is important, and I have used the symbols which I have used in my custom FreeMASTER project, and these symbols are same in the sample project available with SDK FreeMASTER project.
If I put the symbols on IAR Live Watch, I am able to see the correct values but not on my Custom FreeMASTER project.
Regarding your below point.
In your project, you will probably have a fixed electrodes, fixed controls and static assignments, so you will be able to visualize the signals directly from El_0, El_1 and other structures. I'm not an expert on this technology, so I cannot give an advise on what structure members are to be monitored (baseline etc.). Please try it this way and let me know. I would contact an owner of the Touch project here to reach out for more information if needed.
If I understood you correctly, I am already doing this, as mentioned above the symbols. Somehow in my custom FreeMASTER project, FreeMASTER is not able to evaluate the addresses while with the SDK project it is able to evaluate the address properly and plot the data (This is shown in the above post).
Thank you for your support, if I am able to solve this problem it will be really helpful for me and my team members.
Thanks in advance, waiting for your feedback.
I have some bad news - the Touch library uses a pseudo-dynamic allocation to create runtime structures with electrode data. It uses a small memory pool and a simple memory allocator for this purpose. From the FreeMASTER point of view, the only thing which is static at fixed address in memory is the nt_kernel_data, all other structures have dynamic address (fixed after allocated, but not known in compile time). The El_xx structures that I originally thought would be usable in FreeMASTER are just ROM-based configuration structures.
I'm afraid that it is inevitable to use a script that reads the nt_kernel_data and related memory and dynamically creates FreeMASTER symbols and variables. I'm sorry for the confusion and false hope I gave above.
If using existing scripts and the Internet Explorer is not an option for you, we will need to rework the script from ActiveX to JSON-RPC and make it working in the Chrome environment (more about these technologies in this video). This rework will take more time, I cannot give any commitments.
However, there is one thing you can do in the target MCU application to make it working. It is more a "hack" and needs some work, but it is better than nothing. The idea is simple: "If FreeMASTER script cannot do the job, so let's use the MCU application to help". The MCU app would somehow store the "dynamically" allocated data to static variables accessible by FreeMASTER.
I know this not a nice solution and I don't expect you will be happy about it :smileysad:
Regards,
Michal