Page 8 of 8

Re: CreatiVision Console re-Creation

Posted: Sun Apr 27, 2025 10:00 pm
by Editor
djrm wrote: Sat Apr 26, 2025 10:37 pm Edit, it is now possible to build the keyboard project using the files from Github however ...
Sorry, I just noticed your Edit. Unfortunately I don't get notification of msg edits (only new messages).
djrm wrote: Sat Apr 26, 2025 10:37 pm When the Generate button is clicked the existing main.c gets overwritten and needs to be restored with the program code from the Github version. Builds successfully then.
That doesn't happen for me, and shouldn't be happening.

The github included .MC3 file has all of the saved MCC settings, including (on my clean install), the 'Main' Project Resources setting of 'Generate main.c file' being disabled.
djrm wrote: Sat Apr 26, 2025 10:37 pm The content manager MCC has a totally different appearance, updating to the latest made it look like I saw it initially and the project still built (after restoring main.c again)
I noticed this also. The MCC setting options had changed (to what yours looked like in your earlier post), when I initially did the clean MPLAB X IDE install on my new laptop and I only had my original main.c file.

However, after again starting fresh, with the new 'code' github project folder, and following the steps I listed, the MCC options were back to how it is on my main development PC. I just put this down to the included .MC3 file restoring the original project MCC options?
djrm wrote: Sat Apr 26, 2025 10:37 pm I updated something else (not sure what) and the system reverted to the broken style I had the problem with initially. I'll revert and see just what it is that causes the problem - the API has changed and needs the changes I made to make my initial successful build.
I'm definately interested to get to the bottom of this, so that we have a reliable "from scratch" compile procedure for the future.

Currently, my testing on a fresh / new MPLAB X IDE install (note: Windows 10) system, seems to work nicely. Is it possible a Linux install is behaving differently?

Re: CreatiVision Console re-Creation

Posted: Mon Apr 28, 2025 8:00 am
by djrm
Greetings Greg,
I have found that if the version of TCA set in the MCC Content Manager is greater than 6 then compilation needs a different method (as I showed in my first successful build), Version 7 is the latest. I changed this without loosing the contents of main. I think maybe when I upgraded melody that the main.c was overwritten. Best regards, David.
Screenshot from 2025-04-28 08-53-48-crop.png.jpg

Re: CreatiVision Console re-Creation

Posted: Tue Apr 29, 2025 2:52 am
by Editor
djrm wrote: Mon Apr 28, 2025 8:00 am I have found that if the version of TCA set in the MCC Content Manager is greater than 6 then compilation needs a different method (as I showed in my first successful build), Version 7 is the latest. I changed this without loosing the contents of main. I think maybe when I upgraded melody that the main.c was overwritten. Best regards, David.
Yes. After a lot of playing around, I'm not really sure there is a good solution.

I upgraded everything to the latest, and then solved the deprecated calls in a different way (to you).

I suspect if I do anything to bring the project "up-to-date" with the (current) latest versions, the same issue is just likely to occur again with future MPLAB X component updates.

In some ways, perhaps just publishing the main.c file might actually make longer term sense? :thinking:

Re: CreatiVision Console re-Creation

Posted: Tue Apr 29, 2025 6:50 am
by djrm
I like the idea of not having to click endlessly in MCC while not being sure if I'm doing the right thing so having a project file is a good option for me.

I think if you can distribute the code which you are happy with which works with the current version then that is as much as you can do,

In any case I've learnt a bit about code and have a working upgrade to my keyboard. David

Re: CreatiVision Console re-Creation

Posted: Tue Apr 29, 2025 8:14 am
by Editor
djrm wrote: Tue Apr 29, 2025 6:50 am I like the idea of not having to click endlessly in MCC while not being sure if I'm doing the right thing so having a project file is a good option for me.

I think if you can distribute the code which you are happy with which works with the current version then that is as much as you can do,

In any case I've learnt a bit about code and have a working upgrade to my keyboard. David
Thanks for your insight. You are indeed correct. What is now on github is certainly more helpful than the prior main.c code only.

I'll call this little adventure resolved, and move on with my current projects. :geek:

Re: CreatiVision Console re-Creation

Posted: Tue Apr 29, 2025 10:35 am
by djrm
It appears that the library is split into a general purpose timer interface with a selectable timer hardware component, a useful abstraction for various hardware platforms perhaps and possibly presenting a more stable interface for the future. I just happened to hit on my solution after searching for an insight into what had changed and luckily the first thing I tied was successful. I'm interested to know what you did, did you have to use the new timer component?
Editor wrote: Tue Apr 29, 2025 2:52 am I upgraded everything to the latest, and then solved the deprecated calls in a different way (to you).
Best regards, David.

Re: CreatiVision Console re-Creation

Posted: Tue Apr 29, 2025 7:05 pm
by Editor
djrm wrote: Tue Apr 29, 2025 10:35 am I'm interested to know what you did, did you have to use the new timer component?
I just updated all MCC components to "latest".

Then (like you), I removed:

Code: Select all

//const struct TMR_INTERFACE *Timer = &TCA0_Interface;
But, instead of creating a Timer0 wrapper / instance, I simply changed to this (called TCA0_OverflowCallbackRegister() directly, as per tca0.c):

Code: Select all

/*
/*
 * Main Application
 */
int main(void)
{
    /* MCC defined System Setup (initialize) */
    SYSTEM_Initialize();

    /* Setup Timer Interrupt Handler routine */
    TCA0_OverflowCallbackRegister(TCA0_OverflowInterrupt);
All then compiled successfully.