Commit Graph

187 Commits

Author SHA1 Message Date
Sergey
3c025a1e89 Fixed build errors/warnings for gcc 4.7.2. 2014-05-05 23:35:40 -07:00
Alexey Frunze
cdf8933448 Merge remote-tracking branch 'upstream/master' 2014-05-05 21:14:06 -07:00
Serge Vakulenko
058804256a Fixed bug in assembler: incorrect immediate in subu macro. 2014-05-05 20:17:31 -07:00
Serge Vakulenko
a0d072f271 Skeleton: copyright updated. 2014-05-05 12:00:20 -07:00
Serge Vakulenko
f40da13b35 C skeleton simplified. 2014-05-05 11:45:12 -07:00
Serge Vakulenko
19cf54c0c1 Copyright for skeleton updated. 2014-05-05 11:29:53 -07:00
Serge Vakulenko
ed92365a4c Added a skeleton of generic C program. 2014-05-05 11:19:42 -07:00
Serge Vakulenko
a433085324 Merge branch 'master' of https://github.com/RetroBSD/retrobsd 2014-05-05 11:16:30 -07:00
Serge Vakulenko
f39a1429bf Merge pull request #21 from RetroBSD/cc-use-smallerc
/bin/cc command modified to use SmallerC compiler by default (not LCC).
2014-05-05 11:16:06 -07:00
Alexey Frunze
06d027b4c5 Merge remote-tracking branch 'upstream/master' 2014-05-04 01:23:36 -07:00
Sergey
6f47acb2ae Fixed bug in assembler, introduced by previos patch.
(Negative offsets in LW/SW not recognized)
Also, modified stdlib.h for compatibility with SmallerC.
2014-05-03 23:56:57 -07:00
Alexey Frunze
a2bc88bdb6 fixes, improvements, __interrupt
Fixes/workarounds:
- octal escape sequence is to be terminated no later than after three
octal digits:
"\1011" is now parsed equivalently to "A1"
- workaround truncation of immediate operands to 16 bits in MIPS
instructions addi[u], subi[u], slti[u], andi, ori, xori in RetroBSD's as
(disabled since as is being fixed).

Improvements:
- warn on string literal truncation when initializing array of char
- generate trap/break-less form of MIPS div[u]

New:
- experimental support for __interrupt functions (x86/huge only)
2014-05-03 18:55:18 -07:00
Sergey
e0ba612250 Range check fixed in assembler. 2014-05-03 17:33:56 -07:00
Sergey
babef284ae Assembler: mode ".set at" required to enable wide immediates in 2-red macros. 2014-05-03 16:55:40 -07:00
Sergey
51a8fd3313 Assembler: added support for large constants for 2-reg variants (macros)
of 3-reg instructions (add, addu, and, or, slt, sltu, sub, subu, xor).
When mode ".set at" enabled, an additional LI instruction is inserted
sing $1 as a scratch register.
2014-05-03 16:34:19 -07:00
Sergey
f67b9db8b5 Merge branch 'master' into cc-use-smallerc 2014-05-03 01:31:06 -07:00
Sergey
777ad1471b Smlrc: option -v moved to target-dependent part.
Fixed bug in simulator: read from incorrect file descriptor when
the second SD card not configured.
2014-05-03 01:28:48 -07:00
Sergey
aff46df8dd Merge branch 'master' into cc-use-smallerc. 2014-05-03 00:37:37 -07:00
Serge Vakulenko
6f15f0ba23 Merge branch 'exec-elf' of https://github.com/RetroBSD/retrobsd 2014-05-02 22:04:16 -07:00
Serge Vakulenko
6f8e71c1b8 Include files modified for compatibility with SmallerC.
Fixed bug in C preprocessor: buffer size reduced to avoid allocation failure.
Added option -v for smlrc.
New example stdarg.c: a demo of function with variable arguments.
2014-05-02 22:00:30 -07:00
Serge Vakulenko
f105cb5bbd /bin/cc command modified to use SmallerC compiler by default (not LCC).
For LCC, please use /bin/lcc instead.

I believe SmallerC is mature enough to try to use it as a primary compiler.
System include files might need some changes (ifdefs) to adapt.
2014-05-01 10:41:41 -07:00
Matt Jenkins
037fc65e93 Merge pull request #19 from alexfru/master
Smaller C: Improve pointer initialization
2014-04-29 13:43:35 +01:00
Matt Jenkins
07b6681eef Improve configsys option parsing
Up until now all the options in the config system have only been
able to take one word (or one string with no spaces) as a parameter.
This update improves it so it takes everything after the = up until
the end of the line (or the first #) as the parameter.
2014-04-29 13:37:09 +01:00
Matt Jenkins
ce1f5ce4dc Improved congigsys option parser
Up until now, options have only been able to have one single word
(or string with no spaces) as their value.  This small patch improves
that and includes everything to either the end-of-line or # (for in-line
comments) as the parameter for the option.
2014-04-29 13:33:54 +01:00
Alexey Frunze
b652f52cb6 Smaller C: Improve pointer initialization
The following global/static pointer initialization should now work:

static char* p1 = "abc" + 1;
static char* p2 = "abc" - 1;
static char* p3 = 1 + "abc";
static int a333[3][3][3];
static int* pa333_111 = &a333[1][1][1];

Other seemingly (and in fact actually) functionality preserving changes
are only to reduce code size when self compiling for DOS using -seg16.
Improvements and fixes require space, sigh.
2014-04-26 15:53:41 -07:00
Serge Vakulenko
b98de3368e *.mk configuration files modified for compatibility with latest version
of Mentor Sourcery CodeBench Lite toolchain
(https://sourcery.mentor.com/GNUToolchain/release2641).
All detected issues fixed.
2014-04-24 21:06:37 -07:00
Serge Vakulenko
1b15bcff49 Fixed bug in assembler: incorrect offset in LUI instruction. 2014-04-24 11:56:01 -07:00
Serge Vakulenko
3a38f291a7 Merged kernel support for ELF executable format from karolina.lindqvist.
Now kernel can directly run executables generated by gcc.
2014-04-23 21:43:09 -07:00
Serge Vakulenko
3942e87cd1 Compiled atc game. Fixed include file for curses library. 2014-04-23 20:02:02 -07:00
Matt Jenkins
8d5a6f60b1 Merge pull request #15 from alexfru/master
Smaller C: Fix a benign typo
2014-04-22 11:15:46 +01:00
Alexey Frunze
bc98f62608 Fix a benign typo 2014-04-22 02:57:42 -07:00
Matt Jenkins
d3e8eefb58 Merge pull request #14 from alexfru/master
Improve variable initialization in Smaller C
2014-04-21 09:25:32 +01:00
Alexey Frunze
fd04710c23 Fix initialization
In the following
typedef struct S0 { char ac[4]; } T1;
int v26 = (int)&((T1*)0)->ac[3];
int v27 = &((T1*)0)->ac[3];
v27 should be initialized to 3 just as v26.
2014-04-21 01:08:49 -07:00
Alexey Frunze
a0a4e242e6 Improve variable initialization in Smaller C
Improvements:
- support initialization of multidimensional arrays
- support initialization of structures
- support initialization of structures and arrays inside functions
- support static inside functions

Notes:
- Only fully-bracketed (sic) initialization of arrays is supported.
- && and || have been partially replaced with & and | to slightly reduce
code size when self compiling for DOS using -seg16.
2014-04-20 20:59:47 -07:00
Matt Jenkins
557a7f6c8f Merge branch 'master' of github.com:RetroBSD/retrobsd 2014-04-20 20:24:33 +01:00
Matt Jenkins
a7d0838ea8 Created global version variable 2014-04-20 20:24:18 +01:00
Matt Jenkins
8577d7082d Merge pull request #12 from sevan/patch-3
Update README.md
2014-04-19 18:43:52 +01:00
Sevan Janiyan
e9ff914f88 Update README.md
On Mpide 0023-macosx-20130715 the path is /Applications/Mpide.app/Contents/Resources/Java/hardware/tools/avr
not
/Applications/Mpide.app/Contents/Resources/Java/hardware/tools
2014-04-19 18:40:07 +01:00
Matt Jenkins
3ac301cade Improved UECIDE compiler path handling 2014-04-19 18:33:40 +01:00
Matt Jenkins
aabc8d8702 Merge pull request #11 from sevan/patch-2
Update README.md
2014-04-19 18:26:29 +01:00
Matt Jenkins
122d7bc73e Merge pull request #10 from sevan/patch-1
Update Makefile
2014-04-19 18:26:19 +01:00
Sevan Janiyan
660b8c3814 Update README.md
Ties in with https://github.com/RetroBSD/retrobsd/pull/10
2014-04-19 16:19:25 +01:00
Sevan Janiyan
da4d3a3a8f Update Makefile
Add target to build MAX32 kernel with Ethernet Shield support
2014-04-19 15:46:33 +01:00
Matt Jenkins
b5a8255248 Changed %2 to %s in string format 2014-04-19 13:37:42 +01:00
Matt Jenkins
22c2f77d84 Added "create" flag to AR commands 2014-04-19 11:46:17 +01:00
Matt Jenkins
ad74c37318 Disabled verbose execution 2014-04-19 11:39:55 +01:00
Matt Jenkins
7205bb7ef2 Switched from mktemp to mkstemp 2014-04-19 11:36:18 +01:00
Matt Jenkins
bbcbed61b0 Resolved argument type mismatch warning 2014-04-19 11:20:33 +01:00
Matt Jenkins
e3e3146c38 Added extra SPI transfer mode IOCTLs - IM 2014-04-19 10:01:26 +01:00
Sergey
d404fca13a Fixed bug in assembler: incorrect offset of far symbols in LUI instruction.
Added .gitignore files for most subdirs.
2014-04-18 01:12:49 -07:00