Open i4cy opened 6 years ago
Hi i4cy,
The board uses 24MHz oscillator. PLL divides it by 6 and multiplies by 50, resulting in 24 / 6 * 50 = 200MHz.
Yes, programming by pickit3 or icd3 is OK.
PIC32-specific routines are located here: https://github.com/sergev/LiteBSD/tree/master/sys/mips
Regards, --Serge
Hello Serge,
Many thanks for your prompt reply to the questions. Ok, 24MHz oscillator (not crystal), and this is also confirmed in the source code that you pointed me to. Once I've built the board, if it works I'll keep you posted.
Kind regards, Guy (i4cy)
Now we have a working chipKIT MZ USB bootloader available I believe @EmbeddedMan is going to resurrect the development of the Fubarino SDZ, which is like my SDZL.
That is correct. One of the next upcoming projects will be to update the Fubarino SDZ board to have a better power supply section, then build some protos and put Majeno's MZ bootloader on there, then add that new board to chipKIT core. Not sure on the exact timeframe - but I'm targeting having that all done in the next 3 months.
As intended, I have now built the "equivalent" Majenko SDZL board, but unfortunately I'm unable to get BSDLite working on it.
As this board is not trivial to construct I first suspected the board itself, so I created a simple Microchip Harmony project to toggle a GPIO pin at a specific frequency. After programming the board the test program works as expected, so I am pretty confident that the 24MHz external clock and PIC32MZ chip etc are working ok.
Using Microchip MPLAB IPE v4.00 and ICD3 I managed to program the board using the vmunix.hex (litebsd-sdzl-2017-05-16) file. However I noticed that the CONFIG settings were not correct after loading the HEX file into IPE. I assume that the vmunix.hex file is intended to only work with pic32prog and not with Microchip programmers. The source code machdep.c file contains CONFIG settings for the other supported boards, but it seems not the SDZL board. Anyway the CONFIG settings were set in IPE to something more meaningful (see attached config.txt) and the board reprogrammed.
After powering up or resetting I would expect at least some of the PIC pins to change state from high impedance, especially the UART or SD card pins. Due to the lack of PIC I/O activity I assume that ICD3 has not loaded vmunix.hex correctly. Perhaps I should be using pic32prog to load vmunix.hex instead of ICD3.
Many thanks.
LiteBSD on SDZL board is configured for chipkit serial bootloader. Here is the hex file: https://raw.githubusercontent.com/UECIDE/pic32/master/boards/Majenko%20Technologies/sdzl/bootloader.hex It's a serial bootloader (not USB), configured for pins RB6 and RB7 as RXD and TXD. Any 3.3v TTL-to-USB adapter should work, like: https://raw.githubusercontent.com/wiki/sergev/LiteBSD/majenko-sdzl-with-usb-serial.jpg
To program the bootloader to the board, I use pickit2 and pic32prog. Pickit3 and mdb.sh utility from MPLABX should work as well. When the bootloader is installed, pic32prog can upload the LiteBSD kernel via the serial port. No need for pickit2 or pickit3.
I/O pins on attached schematic look correct. Ethernet port is not currently configured in LiteBSD for SDZL board.
LED on SDZL board is connected to pin RE7.
Hello Serge,
Just to let you know I have finally got the board working. With your help and guidance, in the end I used Microchip IPE and ICD3 to program the bootloader, then used your pic32prog program via the serial port to load the BSDLite kernel. The LED also works.
It is absolutely amazing work having ported BSD onto a PIC albeit at the top of the range that Microchip have to offer. I've migrated code bases over in the past and know how much work can be involved. After I have had fun playing around with BSDLite, I suppose my next project will be to get the Ethernet port wired up and configured.
Thanks again for all your help.
Best wishes, Guy
You have mentioned the Ethernet port is not currently configured in LiteBSD for SDZL board.
Is it possible to configure without having to rebuild the kernel? If so is it just a matter of adding/changing SD card based config files, which files?
If you could point me in the right direction that would be great. Thanks.
Unfortunately the Majenko SDZL board (so far) is not available, either as a design or a premade board. So I am designing an equivalent SDZL board, with the intention that it will work with the pre built SDZL binaries. Like the SDZL board this board will be based around the 64pin PIC32MZ2048ECM064, and expected to support the same peripherals, and so have the same assigned microcontroller pins. The SDZL wiki offers most config and hardware information, as does the LiteBSD startup screen.
But there are some questions that need clarifying, which hopefully someone can answer.
PLL div 1:6 is printed out on the startup screen, so I assume the microcontroller uses a 8MHz crystal?
Unlike the SDZL board, this board will obviously not have a bootloader. So I intend to program the microcontroller directly using the ICSP with one of the Microchip programming tools (e.g. Pickit3 or ICD3) and the vmunix.hex firmware. Will this method work?
I was expecting to find the microcontroller routines amongst the ported source code on the github repository, but I couldn't find any microcontroller specific code. If it is somewhere there, where should I look?
Thanks in advance. BTW what an interesting project, and I tip my hat to Serge for his great work!