RetroBSD

2.11BSD operating system for microcontrollers
It is currently Tue Oct 17, 2017 7:47 am

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: DIP Barebones options?
PostPosted: Wed Oct 11, 2017 6:32 pm 

Joined: Wed Oct 11, 2017 6:28 pm
Posts: 1
Hi all,

I have two questions, both of which may seem a little stupid but I'm going to ask them anyway ;)

I've set up RetroBSD on a Fubarino-SD. I was wondering if there was any bare bones PIC32 chip in a PDIP package that it could be shoehorned into.

The reason I ask is that I've developed a small ATTiny-based board to teach people soldering, and am looking at ideas for what to build next. A DIP-based Unix system would be something I think would definitely excite people looking to go beyond the basics, even if it's utility was fairly constrained.

The other question I have is whether or not it's feasible to trim things to below 128k of RAM. I doubt so, but thought I'd ask.

Cheers,
Steve


Top
 Profile  
 
PostPosted: Thu Oct 12, 2017 10:05 am 
Committer
User avatar

Joined: Thu Oct 11, 2012 8:45 am
Posts: 1793
Location: Room 217, Floor 8, Arm 8, Wheel S7, Mars Base Alpha 3
64KiB is the most RAM you can get in a DIP PIC32 (MX170 / MX270), so as it stands, no you can't put RetroBSD on any of the DIP ones.

Can it be pruned to below 128KiB? Unlikely. You could get it to boot, sure, but you wouldn't be able to run any programs. Memory is already tight, and halving it would be completely crippling.

For the smaller chips you're better off looking at something like FreeRTOS

_________________
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: Fri Oct 13, 2017 8:34 am 
Contributor
User avatar

Joined: Thu Nov 08, 2012 7:04 am
Posts: 2397
Location: Rapa Nui
Or NuttX:
http://nuttx.org/

Works fine with 64kB Ram (and w/ 20kB too). Sdcard with fat32, posix shell, zmodem, etc fit in about 90kB flash. Offers a configuration tool for easy-building the system.
It supports the loading of ELF binaries, loading of the kernel modules (like Linux kernel), and loading of dynamic libraries (all this is for experienced users, I have not tested that yet).
Cool stuff, sure..

NuttShell
http://nuttx.org/doku.php?id=documentation:nuttshell

I've been playing with it on an stm32, but PIC32MX/MZ is supported as well, they say..

Examples from my experiments:
Code:
nsh> echo "mkrd -m 1 -s 512 800" >> /sdcard/mrdisk
nsh> echo "mkfatfs /dev/ram1" >> /sdcard/mrdisk
nsh> echo "mount -t vfat /dev/ram1 /ramdisk" >> /sdcard/mrdisk
nsh> cat /sdcard/mrdisk
mkrd -m 1 -s 512 800
mkfatfs /dev/ram1
mount -t vfat /dev/ram1 /ramdisk
nsh>
nsh> sh /sdcard/mrdisk
nsh>
nsh> df
  Block  Number
  Size   Blocks     Used Available Mounted on
   512      761        2       759 /ramdisk
 32768   485936     3179    482757 /sdcard
nsh>

Code:
nsh> dd if=/mnt/STM32Demo.bin of=/mnt/ZZZZZ
8388608 bytes copied, 37730 msec, 222 KB/s
nsh>
nsh> dd bs=1024 if=/mnt/CCCC.bin of=/mnt/QQQQ.bin
8388608 bytes copied, 25740 msec, 325 KB/s
nsh>
nsh> dd bs=2048 if=/mnt/CCCC.bin of=/mnt/SSSS.bin
8388608 bytes copied, 16930 msec, 495 KB/s
nsh>
nsh> dd bs=4096 if=/mnt/CCCC.bin of=/mnt/GGGG.bin
8388608 bytes copied, 12630 msec, 664 KB/s
nsh>
nsh> dd bs=8192 if=/mnt/CCCC.bin of=/mnt/DDDD.bin
8388608 bytes copied, 10730 msec, 781 KB/s
nsh>
nsh> dd bs=16384 if=/mnt/CCCC.bin of=/mnt/FFFF.bin
8388608 bytes copied, 10340 msec, 811 KB/s
nsh>
nsh> dd bs=32768 if=/mnt/CCCC.bin of=/mnt/EEEE.bin
8388608 bytes copied, 10230 msec, 820 KB/s
nsh>
nsh> dd if=/mnt/CCCC.bin of=/dev/null
8388608 bytes copied, 9990 msec, 839 KB/s
nsh>

Code:
nsh> dd if=/dev/zero of=/rdisk/RRRRR.dat bs=1024 count=128
131072 bytes copied, 40 msec, 3276 KB/s
nsh> df
  Block  Number
  Size   Blocks     Used Available Mounted on
 32768   485936   168522    317414 /mnt
     0        0        0         0 /proc
   512      475      258       217 /rdisk
nsh>

Code:
nsh> xd 20000000 65536 > /mnt/iram_dump.txt
nsh> ls -l /mnt
/mnt:
 -rw-rw-rw-  290826 iram_dump.txt
..
nsh> cat /mnt/iram_dump.txt
Hex dump:
..
0080: fe 54 68 69 73 20 69 73 20 6e 6f 74 20 61 20 62 .This is not a b
0090: 6f 6f 74 61 62 6c 65 20 64 69 73 6b 2e 20 20 50 ootable disk.  P
..

@majenko: I highly recommend to your very attention - really a great gadget..
Offers tremendous amount of features..

PS: I've been running it on an stm32F103ZET (64kB ram, 512kB flash) with a 512kB external sram wired via FSMC. Sdcard w/ fat32 via SPI @36MHz (DMA on). All hw settings supported by the menuconfig tool. The external 512kB sram here is used as a ramdisk only (not needed for running the OS).

It will definitely run on a DIP PIC32 (MX170 / MX270) as it runs on an stm32F103C8 (20kB ram, 128kB flash).
On MZ it could support the MMU, afaik.

_________________
Pukao Hats Cleaning Services Ltd.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

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