Commit Graph

241 Commits

Author SHA1 Message Date
Sergey
5f4ecde705 Fixed bug in cdevname(). 2015-05-30 19:26:12 -07:00
Sergey
f3ee6644b2 Create /var/cron directory at build time. 2015-05-30 19:07:40 -07:00
Sergey
6b3455956a Create all devices at build time. Don't call devupdate from /etc/rc
before fs check - it can ruin the filesysem.
2015-05-30 18:54:50 -07:00
Sergey
e08e51f1b9 Use permanent allocation of major indexes for character devices. 2015-05-30 18:28:22 -07:00
Sergey
a234dfc7dc Uart driver: on close, wait for output queue to drain. 2015-05-30 16:56:03 -07:00
Serge Vakulenko
f08aabff03 Merge pull request #48 from alexfru/master
fix libicache: sign-extend the immediate in SLTIU.
2015-05-30 15:31:48 -07:00
Alexey Frunze
ea88242733 Merge remote-tracking branch 'upstream/master' 2015-05-29 22:46:46 -07:00
Serge Vakulenko
4e8398cbc9 Driver oc renamed to pwm. 2015-05-29 20:41:26 -07:00
Serge Vakulenko
33fbb51528 Fubarino and Picadillo boards: spi and oc drivers enabled. 2015-05-29 20:14:17 -07:00
Serge Vakulenko
76df048700 Dhrystone: print dmips with better precision. 2015-05-29 16:34:46 -07:00
Serge Vakulenko
d10b71a307 Dhrystone benchmark added to /share/examples. 2015-05-29 13:39:00 -07:00
Alexey Frunze
51f41b2cca fix libicache: sign-extend the immediate in SLTIU 2015-05-28 06:40:02 -07:00
Sergey
fcf0f3dad2 Fixed Makefile (led7) for sensors examples. 2015-05-24 00:10:05 -07:00
Serge Vakulenko
e949850567 Merge pull request #47 from alexfru/master
Smaller C: Improve initialization of variables
2015-05-23 01:50:17 -07:00
Alexey Frunze
3afa8e5979 Smaller C: Improve initialization of variables
- throw away data of string literals inside sizeof, e.g.
    sizeof "a"
    sizeof("a"+1)
- support minimally and inconsistently bracketed (sic)
  initialization, e.g.:
    int y[4][3] = { 1, 3, 5, 2, 4, 6, 3, 5, 7 };
    struct { int a[3], b; } w[] = { { 1 }, 2 };
- scalar initializers can be optionally enclosed in
  braces, e.g.:
    int i1 = { 1 };
2015-05-23 01:15:52 -07:00
Serge Vakulenko
976d84d56d Merge pull request #45 from alexfru/master
Smaller C improvements.
2015-05-19 20:50:40 -07:00
Serge Vakulenko
d5599ae63a Led6 example fixed. 2015-05-19 20:47:30 -07:00
Serge Vakulenko
0c22adf6bf Added example for 6-digit LCD display. 2015-05-19 17:35:41 -07:00
Sergey
7590783d92 Added demos for LED cube 8x8x8. 2015-05-17 22:39:30 -07:00
Alexey Frunze
6144631bc5 Smaller C: Support structure passing/returning by value on MIPS 2015-05-17 15:28:37 -07:00
Alexey Frunze
4ea521eabf Smaller C improvements
- type specifiers may occur in any order
  (e.g. "unsigned short int" and "int short unsigned")

- use .rodata/.rdata section for string literals
- arbitrary length string literals (hooray!)
- better concatenation of adjacent string literals
  (now works even across preprocessor directives)

Support .bss section
- -nobss option in smlrc: use .data instead of .bss as before
- take advantage of .bss in smlrc (put a large array into it)

Remove dead/useless code

Remove useless/rarely used features/options:
-use-gp (MIPS)
-flat16/-flat32 (x86)
-seg16t (x86), -seg16 is now the default
-ctor-fxn

Add/change:
- use EXIT_FAILURE=1 instead of -1 in smlrc when aborting
  due to an error
2015-05-16 05:57:39 -07:00
Serge Vakulenko
352d23a073 Merge branch 'master' of https://github.com/RetroBSD/retrobsd 2015-05-15 22:59:54 -07:00
Serge Vakulenko
c054a40805 Fixed bug in tetris. 2015-05-15 22:59:16 -07:00
Serge Vakulenko
23f426ded5 Tetris example modified for cc compatibility. 2015-05-15 22:22:44 -07:00
Serge Vakulenko
bf27d6d5c3 Added tetris and joystick examples. 2015-05-15 22:12:01 -07:00
Sergey
c40136c25d Merge branch 'master' of https://github.com/RetroBSD/retrobsd 2015-05-14 22:52:27 -07:00
Serge Vakulenko
ea03a4bc98 ADM demo rewritten without curses.
Examples reorganized.
Added examples for 37-in-1 sensor kit (not complete yet).
2015-05-14 22:11:47 -07:00
Serge Vakulenko
581ab61262 Fixed bug in gpio driver: /dev/confX device not able to configure the pin mask. 2015-05-14 12:38:04 -07:00
Sergey
f2fe94f32d Register dump fixed. 2015-05-08 22:18:10 -07:00
Serge Vakulenko
ff4a186025 Merge pull request #43 from alexfru/master
Fix issue #40.
2015-04-26 00:22:10 -07:00
Alexey Frunze
d95f161319 Merge remote-tracking branch 'upstream/master' 2015-04-25 20:05:13 -07:00
alex
a20c02c11f Fix issue #40. Properly flush stdio's streams at exit. 2015-04-25 19:49:26 -07:00
Serge Vakulenko
e5e44bfb94 Merge pull request #42 from alexfru/master
Smaller C fixes.
2015-04-25 18:12:46 -07:00
alex
acd1b5da26 Merge branch 'master' of https://github.com/alexfru/retrobsd 2015-04-25 18:05:44 -07:00
alex
a4bdbd4662 Bugfixes
- properly sign-/zero-extend returned values, e.g. the following
function must return 255 and not -1:

unsigned char f(void) { return -1; }

- properly decay arrays on the left side of ->, e.g. the following must
compile:

{
  struct {char c;} s[1];
  s[0].c = 'a'; putchar(s[0].c);
  (s+0)->c = 'b'; putchar(s[0].c);
  (*s).c = 'c'; putchar(s[0].c);
  s->c = 'd'; putchar(s[0].c);
  putchar('\n');
}

Also:
- support structure passing/returning by value (x86 only)
2015-04-25 18:03:55 -07:00
alex
301d069a1a Bugfixes
- properly sign-/zero-extend returned values, e.g. the following
function must return 255 and not -1:

unsigned char f(void) { return -1; }

- properly decay arrays on the left side of ->, e.g. the following must
compile:

{
  struct {char c;} s[1];
  s[0].c = 'a'; putchar(s[0].c);
  (s+0)->c = 'b'; putchar(s[0].c);
  (*s).c = 'c'; putchar(s[0].c);
  s->c = 'd'; putchar(s[0].c);
  putchar('\n');
}
2015-04-25 17:54:17 -07:00
Sergey
9bbe938e48 At startup, set peripheral clock PBCLK as defined by busdiv option
in kernel configuration file.
2015-02-14 20:20:19 -08:00
Sergey
d5c97a9b19 Added bit definitions for OSCCON register.
File machdep.c reindented.
2015-02-14 17:57:48 -08:00
Sergey
0005e7d7bf Fixed bug in fsck: using bcopy() instead of structure assignment.
File exception.c converted to indent4 format.
2015-02-13 21:05:03 -08:00
Sergey
42665ba3b3 SPI bus driver simplified. 2015-02-13 19:48:32 -08:00
Sergey
942bdda5ed Diskspeed: added extra sync and timeout before each test. 2015-02-13 19:41:32 -08:00
Serge Vakulenko
5ce8a8cd33 Added diskspeed utility. 2015-02-12 19:27:59 -08:00
Serge Vakulenko
b3442f28f3 Finalize skel.h. 2015-02-05 19:12:50 -08:00
Serge Vakulenko
29c75b3f71 Skeleton driver completed. 2015-02-05 19:08:53 -08:00
Serge Vakulenko
9b9f6392dc Added a skeleton for character driver. 2015-02-05 19:05:59 -08:00
Serge Vakulenko
f5bbefc222 Fixed indenting in devsw.c. 2015-02-05 18:13:17 -08:00
Serge Vakulenko
7f5ad5d3f8 Using Max32 board with Arduino SD card shield as a default configuration. 2015-02-04 14:28:03 -08:00
Serge Vakulenko
df8f8eaf71 Directory sys/pic32/max32 removed: nobody is using this configuration,
as it required a nonstandard SD card connection.
2015-02-04 14:18:42 -08:00
Serge Vakulenko
f62f70c718 Max32-eth configuration: SD card speed reduced to 10MHz.
Now it works stable with MakerStudio SD card shield.
2015-02-02 22:26:19 -08:00
Serge Vakulenko
1916f8c9da New kernel configuration: chipKIT WF32 board with microSD card on 2.4" LCD TFT display shield.
WF32 board by itself already has a microSD socket.
It's useless for RetroBSD though, as it is not connected to any
of available SPI ports (must use GPIO instead).

Fortunately, a cheap shield is widely available, which adds a microSD slot
connected to SPI2 pins.
2015-01-28 19:14:41 -08:00