• Please review our updated Terms and Rules here

Building FreHD software in MPLab X?

behines

Member
Joined
Feb 24, 2024
Messages
37
Location
Pasadena, CA, USA
Real short summary: Has anyone built the FreHD PIC code in the latest MPLab X?

TL;DR:
I have built up a FreHD board, but it's not working. I am digging in on diagnosing it. (The board was built by PCBWay per this fab, and I flashed the GAL and PIC with version 2.14 using the images from AnotherMaker, who I think may be Dan Hoover who posted the PCBWay project, not sure.)

Current status:
  • The FreHD flashes green briefly at power-up, and also when I insert an SD card.
  • I have prepared the SD card as described in various places, with FreHD.rom in the root.
  • If I boot LDOS, it does not seem to see a hard drive. (But I am new to TRS-80 and LDOS, so this is not 100% proof that it isn't working.)
  • When I boot TJBChris's FreHD bootstrap disk from my Gotek, it says "ERROR LOADING FREHD ROM".
  • I have thoroughly cleaned the motherboard expansion connector first with isopropyl, then with contact cleaner.
  • The 50-pin drive cable is in excellent condition, brand new, made it myself.
So I'm ready to start debugging. I'd like to hook up my PICKit 5 to the processor and walk through execution of the code on the PIC and see if I can figure out what is going on. I went to veco's GitHub to get the latest code for trs_hard (which I think is correct for my Model III?) from here.


So now my question. Has anyone managed to import this code into MPLab X? Fred's README states that he used MPLab 8, and I was able to import his tree as a MPLab 8 project into MPLab X, which is what Microchip is pushing now. (It does appear that with effort one can find MPLab 8 in the "32-bit Windows" section under "MPLAB IDE Archives" here, so I could go back to that if need be, although I worry about what my computer would think about having two different MPLab's installed.)

In any event, I was able to import the project into MPLab X. But after the successful import, things get squirrelly. The first thing I ran into is simple - "p18f4620.h" needs to be changed to "pic18f4620.h". But that appears to just be the beginning of the rabbit-hole. There are other error messages from the assembly code, just the beginning a long list of complaints from the updated build environment.

One possible issue is that Fred used the C18 compiler, while Microchip is currently using something called the XC8 compiler by default. The Project Properties dialog for the project shows C18 in the "Compiler Toolchain" dialog, but it is not possible to select anything but XC8, which I don't understand. If you click on "C18" here, nothing happens:

1713687452991.png

So, this is challenging. Has anyone done the port to MPLab X? Would Fred himself would be interested? I imagine it would be of general benefit to the community to have the update done. If necessary I can be the tip of the spear, but if someone has gone before, your help would be most welcome. I'm in a bit over my head trying to port code that I don't understand yet. I guess I can try it in MPLab 8, but I imagine it would be of benefit to all to have it brought forward.

Thanks,
Brad
 
For anyone who happened to follow this, I am standing down on the port to MPLab X, as I got my FreHD working.

It was just a bad cable. (My arrogant assertion that my self-made cable was "excellent" turned out to be wrong. I had put the little clamping piece on backwards and wasn't getting a complete clamp on the edge connector connector. Turned it around and re-clamped, and voila, FreHD!)
 
Back
Top