RetroBSD

2.11BSD operating system for microcontrollers
It is currently Thu Jul 16, 2020 2:44 am

All times are UTC




Post new topic Reply to topic  [ 192 posts ]  Go to page Previous  1 ... 5, 6, 7, 8, 9, 10  Next
Author Message
PostPosted: Tue Jan 13, 2015 7:41 am 
Committer
User avatar

Joined: Wed Oct 10, 2012 11:01 pm
Posts: 1081
Location: Sunnyvale, CA
Hi Matt,
majenko wrote:
Code:
panic: setrunqueue
syncing disks... done
Seems like the kernel puts the process (presumably /sbin/init) to the run queue, but the process is already in queue. This can be a result of a stray interrupt or wrong interrupt masking. I can try to reproduce this issue on simulator. Please, send me your vmunix.hex file.

majenko wrote:
Serge & Pito - send me your postal addresses and I'll send you one to play with (I have 2 spare MZ chips at the moment).
It would be great to have SDZL board handy. Combined with ENC424J600 Ethernet controller, it would become a perfect networked LiteBSD platform. Address sent by private message.


Top
 Profile  
 
PostPosted: Tue Jan 13, 2015 7:55 am 
Committer
User avatar

Joined: Wed Oct 10, 2012 11:01 pm
Posts: 1081
Location: Sunnyvale, CA
rmiddleton wrote:
What's different about the MMU on the MZ series vs the MX series? Also, what do you mean in terms of 'memory' - RAM or flash?

MZ has a standard mips32r2 memory management unit implemented, so called TLB block (translation lookaside buffer). It contains 16 dual-page entries. MMU allows to implement a virtual memory for user processes or for the kernel itself. Pages can be loaded from the external media (SD card) on demand. You can find a good description of MIPS MMU in book "See MIPS Run Linux", Chapter 6.


Top
 Profile  
 
PostPosted: Tue Jan 13, 2015 10:38 am 
Committer
User avatar

Joined: Thu Oct 11, 2012 8:45 am
Posts: 1801
Location: Room 217, Floor 8, Arm 8, Wheel S7, Mars Base Alpha 3
vak wrote:
Hi Matt,
majenko wrote:
Code:
panic: setrunqueue
syncing disks... done
Seems like the kernel puts the process (presumably /sbin/init) to the run queue, but the process is already in queue. This can be a result of a stray interrupt or wrong interrupt masking. I can try to reproduce this issue on simulator. Please, send me your vmunix.hex file.

majenko wrote:
Serge & Pito - send me your postal addresses and I'll send you one to play with (I have 2 spare MZ chips at the moment).
It would be great to have SDZL board handy. Combined with ENC424J600 Ethernet controller, it would become a perfect networked LiteBSD platform. Address sent by private message.

The config file for the build is in the git repo (SDZL.pic32). Would you rather the .elf file than the .hex file? Easier for debugging an elf isn't it?

_________________
Why not visit my shop? http://majenko.co.uk/catalog
Universal IDE: http://uecide.org
"I was trying to find out if it was possible to only eat one Jaffa Cake. I had to abandon the experiment because I ran out of Jaffa Cakes".


Top
 Profile  
 
PostPosted: Tue Jan 13, 2015 4:59 pm 

Joined: Tue Aug 19, 2014 2:27 pm
Posts: 10
vak wrote:
rmiddleton wrote:
What's different about the MMU on the MZ series vs the MX series? Also, what do you mean in terms of 'memory' - RAM or flash?

MZ has a standard mips32r2 memory management unit implemented, so called TLB block (translation lookaside buffer). It contains 16 dual-page entries. MMU allows to implement a virtual memory for user processes or for the kernel itself. Pages can be loaded from the external media (SD card) on demand. You can find a good description of MIPS MMU in book "See MIPS Run Linux", Chapter 6.


That makes sense. The PIC32 reference manual (section 2) does indicate that all PIC32s have MMUs, but I'm assuming that the implementation is different.

(It has been a while since I have done any OS-related development)


Top
 Profile  
 
PostPosted: Wed Jan 14, 2015 2:12 am 

Joined: Sun Dec 07, 2014 1:47 am
Posts: 22
vak wrote:
Hi Matt,
majenko wrote:
Code:
panic: setrunqueue
syncing disks... done
Seems like the kernel puts the process (presumably /sbin/init) to the run queue, but the process is already in queue. This can be a result of a stray interrupt or wrong interrupt masking. I can try to reproduce this issue on simulator. Please, send me your vmunix.hex file.

majenko wrote:
Serge & Pito - send me your postal addresses and I'll send you one to play with (I have 2 spare MZ chips at the moment).
It would be great to have SDZL board handy. Combined with ENC424J600 Ethernet controller, it would become a perfect networked LiteBSD platform. Address sent by private message.


That is the card I should have bought...it has pins I can actually see. ;)


Top
 Profile  
 
PostPosted: Fri Jan 30, 2015 1:50 pm 

Joined: Mon Nov 24, 2014 1:07 pm
Posts: 58
Hi Serge and everyone,

Will there be i2c drivers built into the kernel in 4.4 BSD Lite? I've been trying to get something working in 2.11 RetroBSD for the MX795 but it's taking me ages to get to grips with how everything hangs together, that's without looking at the pic32 i2c hardware yet! I'm not sure exactly how I should proceed to write the driver, should it be a bus implementation like the spi bus or just a basic driver like the oc and adc drivers??

Any pointers from anyone on here would be much appreciated. Oh yes, I also know the pic32 microchip libraries have issues so using that as a base point would almost certainly give me grief too :)

Keep up the good work :)

Dan


Top
 Profile  
 
PostPosted: Fri Feb 06, 2015 3:52 am 
Committer
User avatar

Joined: Wed Oct 10, 2012 11:01 pm
Posts: 1081
Location: Sunnyvale, CA
DanTheMan wrote:
Hi Serge and everyone,

Will there be i2c drivers built into the kernel in 4.4 BSD Lite? I've been trying to get something working in 2.11 RetroBSD for the MX795 but it's taking me ages to get to grips with how everything hangs together, that's without looking at the pic32 i2c hardware yet! I'm not sure exactly how I should proceed to write the driver, should it be a bus implementation like the spi bus or just a basic driver like the oc and adc drivers??

Any pointers from anyone on here would be much appreciated. Oh yes, I also know the pic32 microchip libraries have issues so using that as a base point would almost certainly give me grief too :)

Keep up the good work :)

Dan

Thank you, Dan. :)

We have no I2C driver yet. It would be great to have one. I think, a simple implementation like adc would be fine. Current spi driver seems a bit too complicated. It's better to do it without Microchip library, to avoid license issues.

There is an wiki page, a brief tutorial on how to write a driver, created my Matt some time ago: http://retrobsd.org/wiki/doku.php/doc/howto-driver. I've extended it a bit with a generic skeleton for character device, and five easy steps to add it to the kernel. Hope it helps.

Best wishes,
--Serge


Top
 Profile  
 
PostPosted: Fri Feb 06, 2015 1:52 pm 

Joined: Mon Nov 24, 2014 1:07 pm
Posts: 58
Thanks Serge,

I've just completed adding the register definitions to the pic32mx.h header file and now I'm looking at implementing just the master mode for the moment. I can always add the slave mode later in case anyone wants to connect two Retro boards together. Documenting it as I go will help me write one for the MZ when I've done the MX version and once I have MZ hardware to play with.

It'll probably take a few weeks with my busy schedule but once done I'll start a new thread and post the details there.

Many Thanks and have fun, as wiz always says :)

Dan


Top
 Profile  
 
PostPosted: Mon Feb 09, 2015 10:10 pm 

Joined: Mon Feb 09, 2015 10:00 pm
Posts: 3
Hi all,

first of all, this is a brilliant project and it reaaaaalllly deserves more attention. Like how much the 8 Bit Atmel
got that took hours to boot linux, this thing is 1000x cooler!!

Second i got a question that does not seem good enough to open a new thread, could anybody
please tell me where to find the config bits in the LiteBSD source? I managed to config RetroBSD
to my needs (oscillator, pic type, uart config), but i can not find the config in the LiteBSD source.
I may be a bit blind. What i am trying to config is just a plain 32mz2048ecg064 without any external
hardware but the SD card. I spent hours trying to figure it out. :oops:

And third - please keep up your good work guys! I would be willing to help testing if theres
anything i can do.

Alex


Top
 Profile  
 
PostPosted: Sun Mar 15, 2015 8:59 am 
User avatar

Joined: Fri Mar 06, 2015 9:13 pm
Posts: 37
Location: Barcelona, SP
Quote:
Second i got a question that does not seem good enough to open a new thread, could anybody
please tell me where to find the config bits in the LiteBSD source? I managed to config RetroBSD
to my needs (oscillator, pic type, uart config), but i can not find the config in the LiteBSD source.
I may be a bit blind. What i am trying to config is just a plain 32mz2048ecg064 without any external
hardware but the SD card. I spent hours trying to figure it out. :oops:


it's inside sys/mips/pic32/machdep.c and then can see the fuses from sys/mips/include/pic32mz.h are not included all options.

Also if you use pickit3, good choice is to use advanced mode and show memory with loaded vmunix.hex and then show configuration memory and then can change anything and try.

I use that to debug the silicon erratas about use of crystal (ON MZ is not good choice to use Crystal, instead use MEMS OSC type on OSC1) 24MHZ and everything works well....

Cheers....

_________________
Dennis MacAlistair Ritchie (Sep.09.1941 - Oct.12.2011)


Top
 Profile  
 
PostPosted: Fri Sep 04, 2015 1:40 am 

Joined: Sun Dec 07, 2014 1:47 am
Posts: 22
What's the current cheapest and easiest board + NIC that'll do networking? I am very without supplies here at the moment.

(I need something to entertain me until I get my dev boards shipped to my new place here in northern california!)


Top
 Profile  
 
PostPosted: Fri Sep 04, 2015 2:42 am 
Committer
User avatar

Joined: Wed Oct 10, 2012 11:01 pm
Posts: 1081
Location: Sunnyvale, CA
gewtnet wrote:
What's the current cheapest and easiest board + NIC that'll do networking? I am very without supplies here at the moment.

I would propose Olimex HMZ144 board with Waveshare LAN8720 module ($11 on Ebay).

A connection table is available at page: https://github.com/sergev/LiteBSD/wiki/ ... 44%20board


Top
 Profile  
 
PostPosted: Tue Sep 15, 2015 7:48 am 

Joined: Mon Nov 24, 2014 1:07 pm
Posts: 58
Hi All,

I've managed to buy an Olimex HMZ144 and I'm trying to get the firmware loaded onto it using a pickit 3 and V2.20 of the mplab ipe. So far it seems to write to the flash but I get no device connected on the computers usb bus when I power up the HMZ144. Does anyone have a really short step by step on getting the board programmed and booting?

BTW: I've so far only tried the latest autobuild, if that makes a difference!?!

Much appreciated,

Dan


Top
 Profile  
 
PostPosted: Tue Sep 15, 2015 8:11 am 
Committer
User avatar

Joined: Wed Oct 10, 2012 11:01 pm
Posts: 1081
Location: Sunnyvale, CA
Please make sure you have devcfg bits properly configured in MPLAB when you program the board. For correct values see lines 136-157 in file machdep.c.

Unfortunately, MPLAB ignores the devcfg values present in the hex file, so it has to be done manually. That's why I prefer pic32prog.

Autobuild image should work just fine. I tested it a few days ago.


Top
 Profile  
 
PostPosted: Tue Sep 15, 2015 8:15 am 

Joined: Mon Nov 24, 2014 1:07 pm
Posts: 58
Hi Serge,

So would it be best to reflash the pickit 3 and use it with pic32prog instead? I'm guessing that I connect it and run the old pickit 3 pc software and reflash it on that first, then try with pic32prog. I'll give that a go rather than load on mpide as i've only loaded the ipe.

Thanks,

Dan


Top
 Profile  
 
PostPosted: Tue Sep 15, 2015 8:26 am 
Committer
User avatar

Joined: Wed Oct 10, 2012 11:01 pm
Posts: 1081
Location: Sunnyvale, CA
In this case you will lose the ability to use PICkit3 as a debugger with MPIDE, in case you need it someday. I would propose just to buy a cheap PICkit2 clone from AliExpress for $9.


Top
 Profile  
 
PostPosted: Tue Sep 15, 2015 8:39 am 

Joined: Mon Nov 24, 2014 1:07 pm
Posts: 58
Hi Serge,

I can always reflash the ipe os back again :) I've switched it back a forth a few times already successfully.

I've tried and it just won't program with the pickit 3. I get memory errors such as "failed to program row flash memory at 1d000000, reply = 00-02-05-07-00". I'll wait until i get home and try with one of my pickit 2's I have lying about.

Thanks again,

Dan


Top
 Profile  
 
PostPosted: Wed Sep 16, 2015 8:04 am 

Joined: Mon Nov 24, 2014 1:07 pm
Posts: 58
Hi Serge,

I've managed to finally flash my HMZ144 board with my pickit 2 and after having to redownload the latest autobuild it seems to flash both the boot block and main flash and verifies ok. However I don't get a COM port show up in device manager on my Windows 7 box. Is the console over the usb or another uart on the pic32?

Thanks for all your help,

Dan


Top
 Profile  
 
PostPosted: Wed Sep 16, 2015 8:17 am 
Committer
User avatar

Joined: Wed Oct 10, 2012 11:01 pm
Posts: 1081
Location: Sunnyvale, CA
Hi Dan,

The console is on UART port, not USB. You need to use some kind of serial-to-USB adapter or something. See wiki page: https://github.com/sergev/LiteBSD/wiki/Olimex%20HMZ144%20board

According to the HMZ144 kernel configuration file, UART2 is used for console:
Code:
device          uart2   flags 0x5958    # pins rx=RE9, tx=RE8

# Console options
options         "CONS_MAJOR=17"         # UART device
options         "CONS_MINOR=1"          # UART2

--Serge


Top
 Profile  
 
PostPosted: Wed Sep 16, 2015 8:38 am 

Joined: Mon Nov 24, 2014 1:07 pm
Posts: 58
Thanks Serge!! I thought of checking that just as I pressed the submit button. Sorry for being a pain in that regards. I've got it all working now, just need to sort out my sd card image and I'm running.

Many thanks again!

Dan


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 192 posts ]  Go to page Previous  1 ... 5, 6, 7, 8, 9, 10  Next

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron




Powered by phpBB® Forum Software © phpBB Group

BSD Daemon used with permission