Compare commits

...

219 Commits

Author SHA1 Message Date
patacongo
efb733dfc4 Prep for 0.3.8 release
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@663 42af7a65-404d-4744-a932-0658087f49c3
2008-02-10 14:08:11 +00:00
patacongo
dda4565ed9 Cleanup make output
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@662 42af7a65-404d-4744-a932-0658087f49c3
2008-02-09 19:31:29 +00:00
patacongo
432da54d46 Fix DM320 serial configuration problem
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@661 42af7a65-404d-4744-a932-0658087f49c3
2008-02-08 17:25:29 +00:00
patacongo
0fca25b777 Add a generic CAN driver
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@660 42af7a65-404d-4744-a932-0658087f49c3
2008-02-08 00:56:16 +00:00
patacongo
ee5f02dae5 update
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@659 42af7a65-404d-4744-a932-0658087f49c3
2008-02-07 14:41:11 +00:00
patacongo
9a7c5c29c5 update
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@656 42af7a65-404d-4744-a932-0658087f49c3
2008-02-07 01:48:15 +00:00
patacongo
54242efbcd Pascal configuration
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@655 42af7a65-404d-4744-a932-0658087f49c3
2008-02-07 01:44:35 +00:00
patacongo
f90fb7cdbe ostest configuration
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@654 42af7a65-404d-4744-a932-0658087f49c3
2008-02-07 01:44:14 +00:00
patacongo
53a99eb382 NSH configuration
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@653 42af7a65-404d-4744-a932-0658087f49c3
2008-02-07 01:43:56 +00:00
patacongo
b252be9bb9 Move configurations to sub-directories
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@651 42af7a65-404d-4744-a932-0658087f49c3
2008-02-07 01:39:20 +00:00
patacongo
3c494bbc9a update
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@647 42af7a65-404d-4744-a932-0658087f49c3
2008-02-07 00:41:05 +00:00
patacongo
669118c68e Fix endian conditional compilation
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@644 42af7a65-404d-4744-a932-0658087f49c3
2008-02-06 21:08:16 +00:00
patacongo
14570ca238 fix compilation errors/warnings
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@643 42af7a65-404d-4744-a932-0658087f49c3
2008-02-06 20:11:39 +00:00
patacongo
2d8db3fabc Fix bug 1887170
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@642 42af7a65-404d-4744-a932-0658087f49c3
2008-02-06 19:13:50 +00:00
patacongo
325e4e3833 Fixes bug 1887170
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@641 42af7a65-404d-4744-a932-0658087f49c3
2008-02-06 19:04:36 +00:00
patacongo
bf2225c26c update
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@640 42af7a65-404d-4744-a932-0658087f49c3
2008-02-06 19:03:48 +00:00
patacongo
4dd560c5f0 Pascal P-Code binaries are now big-endian
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@639 42af7a65-404d-4744-a932-0658087f49c3
2008-02-06 15:44:29 +00:00
patacongo
b114621101 Script clobbered pascal test file
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@638 42af7a65-404d-4744-a932-0658087f49c3
2008-02-06 15:35:40 +00:00
patacongo
e3bd6172aa fflush(NULL) returns error
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@636 42af7a65-404d-4744-a932-0658087f49c3
2008-02-06 01:29:23 +00:00
patacongo
75253df209 update
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@635 42af7a65-404d-4744-a932-0658087f49c3
2008-02-05 22:45:03 +00:00
patacongo
d0a0accc99 ZNeo is big-endian
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@634 42af7a65-404d-4744-a932-0658087f49c3
2008-02-05 21:41:13 +00:00
patacongo
5622797411 Various fixes for buffered R/W I/O and seeking
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@630 42af7a65-404d-4744-a932-0658087f49c3
2008-02-05 18:13:13 +00:00
patacongo
507914b3b4 Make freeports transparent
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@628 42af7a65-404d-4744-a932-0658087f49c3
2008-02-04 00:27:37 +00:00
patacongo
2ab10a107f Update errno discussion
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@627 42af7a65-404d-4744-a932-0658087f49c3
2008-02-03 17:09:22 +00:00
patacongo
97a52f1b17 Add fseek issue
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@626 42af7a65-404d-4744-a932-0658087f49c3
2008-02-03 14:43:09 +00:00
patacongo
039efd6e2b update
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@624 42af7a65-404d-4744-a932-0658087f49c3
2008-02-03 14:03:34 +00:00
patacongo
7dffca15a1 Changes for clean link of pashello with z16f
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@623 42af7a65-404d-4744-a932-0658087f49c3
2008-02-03 13:54:33 +00:00
patacongo
978b0f79ad Fixes for clean pashello compile with z16f
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@622 42af7a65-404d-4744-a932-0658087f49c3
2008-02-03 13:20:54 +00:00
patacongo
0bd70f78e4 Describe pashello config
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@621 42af7a65-404d-4744-a932-0658087f49c3
2008-02-02 20:16:31 +00:00
patacongo
28b1b8fdac Add pashello example
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@619 42af7a65-404d-4744-a932-0658087f49c3
2008-02-02 20:08:12 +00:00
patacongo
757eff86e8 Add analysis of problem
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@618 42af7a65-404d-4744-a932-0658087f49c3
2008-02-02 16:25:19 +00:00
patacongo
f116c153b9 Bad errno access in printf statements
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@617 42af7a65-404d-4744-a932-0658087f49c3
2008-02-02 15:35:32 +00:00
patacongo
174a9f77c6 Fix /dev/zero
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@616 42af7a65-404d-4744-a932-0658087f49c3
2008-02-02 15:04:39 +00:00
patacongo
3fd8bd65f4 Integration pascal test case on the sim platform
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@614 42af7a65-404d-4744-a932-0658087f49c3
2008-02-01 22:47:24 +00:00
patacongo
2f1acf6786 Add fseek()
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@613 42af7a65-404d-4744-a932-0658087f49c3
2008-02-01 22:32:16 +00:00
patacongo
09af7cf6ce Added lseek()
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@612 42af7a65-404d-4744-a932-0658087f49c3
2008-02-01 22:19:20 +00:00
patacongo
00ad2ca2c4 Move sim configurations to sub-directories
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@611 42af7a65-404d-4744-a932-0658087f49c3
2008-02-01 21:34:41 +00:00
patacongo
ce1c48f5b6 examples/pashello configuration
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@610 42af7a65-404d-4744-a932-0658087f49c3
2008-02-01 21:28:58 +00:00
patacongo
ee8c1a2d58 examples/ostest configuration
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@609 42af7a65-404d-4744-a932-0658087f49c3
2008-02-01 21:28:05 +00:00
patacongo
4c564b97dc examples/nettest configuration
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@608 42af7a65-404d-4744-a932-0658087f49c3
2008-02-01 21:27:17 +00:00
patacongo
ac37ac75e0 errno now defined to be *get_errno_ptr()
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@607 42af7a65-404d-4744-a932-0658087f49c3
2008-02-01 21:23:19 +00:00
patacongo
1e52a8f36a Add pascal test
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@606 42af7a65-404d-4744-a932-0658087f49c3
2008-02-01 20:47:32 +00:00
patacongo
7b3c17b1c1 Add Pascal test case
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@604 42af7a65-404d-4744-a932-0658087f49c3
2008-02-01 14:32:56 +00:00
patacongo
ad8140f162 Pascal Test Case
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@603 42af7a65-404d-4744-a932-0658087f49c3
2008-02-01 14:27:45 +00:00
patacongo
fac0d203bc Free ports
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@602 42af7a65-404d-4744-a932-0658087f49c3
2008-02-01 00:20:35 +00:00
patacongo
e3035d2dff Prep for 0.3.7 release
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@601 42af7a65-404d-4744-a932-0658087f49c3
2008-01-31 23:15:03 +00:00
patacongo
2134001f0f *** empty log message ***
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@600 42af7a65-404d-4744-a932-0658087f49c3
2008-01-31 22:44:19 +00:00
patacongo
aa7ecab89c Function did not match prototype
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@599 42af7a65-404d-4744-a932-0658087f49c3
2008-01-31 22:28:47 +00:00
patacongo
ce50defd4c Fixes for SDCC
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@598 42af7a65-404d-4744-a932-0658087f49c3
2008-01-31 22:25:31 +00:00
patacongo
3dc0fee9ba *** empty log message ***
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@597 42af7a65-404d-4744-a932-0658087f49c3
2008-01-31 22:19:53 +00:00
patacongo
94ef1222d8 ostest result
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@596 42af7a65-404d-4744-a932-0658087f49c3
2008-01-31 22:19:09 +00:00
patacongo
40f92a9da4 Z16F integration changes
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@595 42af7a65-404d-4744-a932-0658087f49c3
2008-01-31 17:59:22 +00:00
patacongo
cb79ddc9a0 fix conditional compilation
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@594 42af7a65-404d-4744-a932-0658087f49c3
2008-01-30 22:33:54 +00:00
patacongo
0a07af9fc7 Recalibrate delay loop
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@593 42af7a65-404d-4744-a932-0658087f49c3
2008-01-30 22:33:00 +00:00
patacongo
1358cc1911 Fix z16f addressing issues
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@592 42af7a65-404d-4744-a932-0658087f49c3
2008-01-30 21:59:12 +00:00
patacongo
9654e2d4b4 errno was clobbered by mm_trysemaphore when task exists
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@591 42af7a65-404d-4744-a932-0658087f49c3
2008-01-30 18:49:31 +00:00
patacongo
c773c4e139 Fix comments
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@590 42af7a65-404d-4744-a932-0658087f49c3
2008-01-30 14:02:16 +00:00
patacongo
59451ae6c0 Cosmetic
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@589 42af7a65-404d-4744-a932-0658087f49c3
2008-01-30 14:01:22 +00:00
patacongo
715cc89148 Cosmetic
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@588 42af7a65-404d-4744-a932-0658087f49c3
2008-01-30 13:21:08 +00:00
patacongo
4a7a565ef3 Typo
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@587 42af7a65-404d-4744-a932-0658087f49c3
2008-01-30 13:08:36 +00:00
patacongo
c55f4a3783 Use mdelay vs inaccurate udelay
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@586 42af7a65-404d-4744-a932-0658087f49c3
2008-01-30 12:55:11 +00:00
patacongo
89c63fc635 Added low-level console driver
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@585 42af7a65-404d-4744-a932-0658087f49c3
2008-01-30 00:59:17 +00:00
patacongo
675205a5de Misc fixes
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@584 42af7a65-404d-4744-a932-0658087f49c3
2008-01-29 23:58:39 +00:00
patacongo
3ae27c3c9e Typo in unused #else
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@583 42af7a65-404d-4744-a932-0658087f49c3
2008-01-29 22:17:06 +00:00
patacongo
8aa92af787 Fix some Z16F serial bugs
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@582 42af7a65-404d-4744-a932-0658087f49c3
2008-01-29 20:13:18 +00:00
patacongo
46f139066c Fix backward conditional compilation
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@581 42af7a65-404d-4744-a932-0658087f49c3
2008-01-29 13:13:04 +00:00
patacongo
b4557a830a Fix bad conditional compilation
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@580 42af7a65-404d-4744-a932-0658087f49c3
2008-01-29 13:08:25 +00:00
patacongo
37d20db817 Z16F Debug
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@579 42af7a65-404d-4744-a932-0658087f49c3
2008-01-29 00:50:16 +00:00
patacongo
5db8af3015 UART config is untested
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@578 42af7a65-404d-4744-a932-0658087f49c3
2008-01-28 22:32:40 +00:00
patacongo
16aff5292e Basic Z16F serial driver functionality
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@577 42af7a65-404d-4744-a932-0658087f49c3
2008-01-28 22:03:49 +00:00
patacongo
4b07e6ffa4 Fix printf-related warnings
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@576 42af7a65-404d-4744-a932-0658087f49c3
2008-01-28 19:09:02 +00:00
patacongo
d15ab7811c Eliminate some Z16F compilation warnings.
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@575 42af7a65-404d-4744-a932-0658087f49c3
2008-01-28 15:45:39 +00:00
patacongo
6e5c4b2316 Z16F compile/link with all OS features enabled
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@574 42af7a65-404d-4744-a932-0658087f49c3
2008-01-28 14:59:21 +00:00
patacongo
4ad0370f60 Add task
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@573 42af7a65-404d-4744-a932-0658087f49c3
2008-01-28 14:10:46 +00:00
patacongo
b65bbad338 Code complete
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@572 42af7a65-404d-4744-a932-0658087f49c3
2008-01-28 02:07:33 +00:00
patacongo
3616465288 Structure serial driver interface to support different interrupt architectures
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@571 42af7a65-404d-4744-a932-0658087f49c3
2008-01-26 23:46:09 +00:00
patacongo
c4ddb4980f Basic NuttX port functional
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@570 42af7a65-404d-4744-a932-0658087f49c3
2008-01-26 16:54:53 +00:00
patacongo
948c8bd2d4 Clock system was missing
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@569 42af7a65-404d-4744-a932-0658087f49c3
2008-01-26 16:21:09 +00:00
patacongo
76d4673969 Fix a16f serial bugs
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@568 42af7a65-404d-4744-a932-0658087f49c3
2008-01-26 14:35:25 +00:00
patacongo
299dc971dd Same fixes as for interrupt return
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@567 42af7a65-404d-4744-a932-0658087f49c3
2008-01-25 23:14:49 +00:00
patacongo
62f7d251ae minor updates
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@566 42af7a65-404d-4744-a932-0658087f49c3
2008-01-25 22:31:08 +00:00
patacongo
e1f5aeaf51 Initial Z61F debug
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@565 42af7a65-404d-4744-a932-0658087f49c3
2008-01-25 22:28:46 +00:00
patacongo
fb4253bfb2 Add z16f system exception handling logic.
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@564 42af7a65-404d-4744-a932-0658087f49c3
2008-01-25 17:49:43 +00:00
patacongo
30984a7eed Add z16f LED logic
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@563 42af7a65-404d-4744-a932-0658087f49c3
2008-01-24 23:23:49 +00:00
patacongo
6bf63d8d35 Add Z16f context switching logic
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@562 42af7a65-404d-4744-a932-0658087f49c3
2008-01-24 22:43:38 +00:00
patacongo
ee1d841569 Adding context switching logic
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@561 42af7a65-404d-4744-a932-0658087f49c3
2008-01-23 22:11:59 +00:00
patacongo
bf27d79c0d Add preliminary support for Z16F serial port
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@560 42af7a65-404d-4744-a932-0658087f49c3
2008-01-23 20:38:12 +00:00
patacongo
ad12689460 *** empty log message ***
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@559 42af7a65-404d-4744-a932-0658087f49c3
2008-01-23 16:16:34 +00:00
patacongo
dfca90057b Fixes for clean(er) compilation
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@558 42af7a65-404d-4744-a932-0658087f49c3
2008-01-23 15:48:26 +00:00
patacongo
9291ec957f Missed cloing comment
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@557 42af7a65-404d-4744-a932-0658087f49c3
2008-01-21 14:03:36 +00:00
patacongo
1f115108e6 Fix Z16F context structure
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@556 42af7a65-404d-4744-a932-0658087f49c3
2008-01-13 15:31:26 +00:00
patacongo
9108a01f1d Fixes for compile
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@555 42af7a65-404d-4744-a932-0658087f49c3
2008-01-12 17:37:22 +00:00
patacongo
b07eb44e4e Fix some ZDS-II compile errors
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@554 42af7a65-404d-4744-a932-0658087f49c3
2008-01-11 22:40:09 +00:00
patacongo
0d102fa42e untest z16f code
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@553 42af7a65-404d-4744-a932-0658087f49c3
2008-01-11 18:19:09 +00:00
patacongo
1b853a92bb Add Z16F interrupts
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@552 42af7a65-404d-4744-a932-0658087f49c3
2008-01-11 13:59:38 +00:00
patacongo
0dd2134fa8 Add board init
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@551 42af7a65-404d-4744-a932-0658087f49c3
2008-01-11 13:56:58 +00:00
patacongo
9dbc6e1c2f z16f common directory
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@550 42af7a65-404d-4744-a932-0658087f49c3
2008-01-11 13:20:53 +00:00
patacongo
517d951c67 Add low-level UART support
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@549 42af7a65-404d-4744-a932-0658087f49c3
2008-01-11 00:02:55 +00:00
patacongo
8f3ef9954e Add Z16F head assembly
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@548 42af7a65-404d-4744-a932-0658087f49c3
2008-01-10 21:10:30 +00:00
patacongo
0a32f4d20b Passing union parms as const upsets ZDS-II compiler
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@547 42af7a65-404d-4744-a932-0658087f49c3
2008-01-10 19:16:50 +00:00
patacongo
544a21b80c Fix Windows path conversions
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@546 42af7a65-404d-4744-a932-0658087f49c3
2008-01-10 18:40:16 +00:00
patacongo
291270beb5 Using tool-specific clean
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@545 42af7a65-404d-4744-a932-0658087f49c3
2008-01-10 18:23:08 +00:00
patacongo
af73c158f2 First cut at ZDS-II link command
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@544 42af7a65-404d-4744-a932-0658087f49c3
2008-01-10 18:16:20 +00:00
patacongo
d387191f04 z16f ostest config
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@543 42af7a65-404d-4744-a932-0658087f49c3
2008-01-10 18:13:27 +00:00
patacongo
0e4924079a Clean operations are now toolchain specific
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@542 42af7a65-404d-4744-a932-0658087f49c3
2008-01-10 13:38:13 +00:00
patacongo
435528e7a0 Add control reg defs
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@541 42af7a65-404d-4744-a932-0658087f49c3
2008-01-10 01:41:58 +00:00
patacongo
e881da738c Compiles with ZDS-II
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@540 42af7a65-404d-4744-a932-0658087f49c3
2008-01-09 22:53:52 +00:00
patacongo
83f36eac7d Changes for ZNeo compile
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@539 42af7a65-404d-4744-a932-0658087f49c3
2008-01-09 14:20:31 +00:00
patacongo
748bcdbe11 cosmetic
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@537 42af7a65-404d-4744-a932-0658087f49c3
2008-01-09 02:03:14 +00:00
patacongo
e59f302e50 Fix ZNeo compile errors
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@536 42af7a65-404d-4744-a932-0658087f49c3
2008-01-09 01:22:06 +00:00
patacongo
817b284a13 Support C pre-processors without variable-arg macros
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@535 42af7a65-404d-4744-a932-0658087f49c3
2008-01-09 01:13:24 +00:00
patacongo
3dffab3aca Need absolute paths for 'fake' links
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@534 42af7a65-404d-4744-a932-0658087f49c3
2008-01-09 00:13:13 +00:00
patacongo
0156bc785f Turn off script debug
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@533 42af7a65-404d-4744-a932-0658087f49c3
2008-01-09 00:07:03 +00:00
patacongo
32c3e79ece Need to handle paths with spaces in them
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@532 42af7a65-404d-4744-a932-0658087f49c3
2008-01-08 23:55:02 +00:00
patacongo
03d8c867cf Spell checked
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@531 42af7a65-404d-4744-a932-0658087f49c3
2008-01-08 22:19:32 +00:00
patacongo
3f1c7dc771 Add logic for environments that can't use soft links
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@530 42af7a65-404d-4744-a932-0658087f49c3
2008-01-08 22:11:00 +00:00
patacongo
c691f1db9d Cygwin path craziness
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@529 42af7a65-404d-4744-a932-0658087f49c3
2008-01-08 19:45:13 +00:00
patacongo
d8b91b19e5 Make logic reorganized for non-GNU toolchain
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@528 42af7a65-404d-4744-a932-0658087f49c3
2008-01-08 17:06:21 +00:00
patacongo
8216d763a6 Fix some compile options
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@527 42af7a65-404d-4744-a932-0658087f49c3
2008-01-08 14:26:17 +00:00
patacongo
131931c877 Reduce make output
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@526 42af7a65-404d-4744-a932-0658087f49c3
2008-01-08 13:41:00 +00:00
patacongo
71f2d3d25d ZNeo compiler now works
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@525 42af7a65-404d-4744-a932-0658087f49c3
2008-01-08 13:02:47 +00:00
patacongo
11e06742c2 Fix dates
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@524 42af7a65-404d-4744-a932-0658087f49c3
2008-01-08 04:52:50 +00:00
patacongo
eda24c6c3a Document 0.3.6.1 release
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@523 42af7a65-404d-4744-a932-0658087f49c3
2008-01-08 04:48:36 +00:00
patacongo
c5a589f25b Add support for tools that can't make dependencies
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@522 42af7a65-404d-4744-a932-0658087f49c3
2008-01-08 00:19:24 +00:00
patacongo
7a9bfd3ccb Adding support for Z16F
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@521 42af7a65-404d-4744-a932-0658087f49c3
2008-01-07 23:19:24 +00:00
patacongo
93dd5f44cb Adding support for the z16f
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@520 42af7a65-404d-4744-a932-0658087f49c3
2008-01-07 23:13:12 +00:00
patacongo
f14e8056ce Add TODO item
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@519 42af7a65-404d-4744-a932-0658087f49c3
2008-01-07 12:58:17 +00:00
patacongo
1fd8bd11af Prep for 0.3.6
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@518 42af7a65-404d-4744-a932-0658087f49c3
2008-01-06 21:03:42 +00:00
patacongo
dc5142224c Add configuration for toolchains without libm
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@517 42af7a65-404d-4744-a932-0658087f49c3
2008-01-06 20:46:45 +00:00
patacongo
662d64f8e0 Add float types needed by pcode runtime
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@516 42af7a65-404d-4744-a932-0658087f49c3
2008-01-06 15:50:20 +00:00
patacongo
731e425116 Add support for Pascal P-Code interpreter
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@511 42af7a65-404d-4744-a932-0658087f49c3
2008-01-05 19:05:31 +00:00
patacongo
d586fa633b Fix html errors
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@484 42af7a65-404d-4744-a932-0658087f49c3
2008-01-04 13:11:45 +00:00
patacongo
eda17b05f7 update
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@483 42af7a65-404d-4744-a932-0658087f49c3
2008-01-04 01:06:27 +00:00
patacongo
7202b1b19d update
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@479 42af7a65-404d-4744-a932-0658087f49c3
2008-01-02 14:17:02 +00:00
patacongo
d54f596884 joininfo field not used if PTHREADS suppressed
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@478 42af7a65-404d-4744-a932-0658087f49c3
2008-01-02 14:15:07 +00:00
patacongo
424eae4cfb Debug z80sim NSH (still doesn't work)
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@476 42af7a65-404d-4744-a932-0658087f49c3
2008-01-01 14:54:10 +00:00
patacongo
db57264e1f Fix deadlock cases
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@475 42af7a65-404d-4744-a932-0658087f49c3
2008-01-01 14:53:16 +00:00
patacongo
d9080fb256 Debug NSH on z80sim
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@474 42af7a65-404d-4744-a932-0658087f49c3
2007-12-31 23:52:53 +00:00
patacongo
c2c6b55515 Add logic to init global data on bootup
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@473 42af7a65-404d-4744-a932-0658087f49c3
2007-12-31 19:05:45 +00:00
patacongo
b6f43e7144 Add z80 signals
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@472 42af7a65-404d-4744-a932-0658087f49c3
2007-12-31 15:45:58 +00:00
patacongo
ab44069b4b update
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@470 42af7a65-404d-4744-a932-0658087f49c3
2007-12-31 00:51:20 +00:00
patacongo
c690cf8df5 update
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@469 42af7a65-404d-4744-a932-0658087f49c3
2007-12-31 00:50:09 +00:00
patacongo
8403a62cdf More SDCC compilation fixes
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@468 42af7a65-404d-4744-a932-0658087f49c3
2007-12-30 23:34:20 +00:00
patacongo
f038ce79e9 Additional corrections to state restore logic
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@466 42af7a65-404d-4744-a932-0658087f49c3
2007-12-30 21:54:55 +00:00
patacongo
821975f7bd Needs same fixes as for up_head.asm
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@465 42af7a65-404d-4744-a932-0658087f49c3
2007-12-30 21:21:19 +00:00
patacongo
c61ade4480 Add support of other resets
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@464 42af7a65-404d-4744-a932-0658087f49c3
2007-12-30 21:08:23 +00:00
patacongo
772ad744e0 Integrating z80
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@463 42af7a65-404d-4744-a932-0658087f49c3
2007-12-30 18:13:22 +00:00
patacongo
c2f88659b5 Assembly errors
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@461 42af7a65-404d-4744-a932-0658087f49c3
2007-12-30 00:05:47 +00:00
patacongo
b516dfa9b6 Fix comments and reg frame offsets
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@460 42af7a65-404d-4744-a932-0658087f49c3
2007-12-29 23:47:22 +00:00
patacongo
62062f5873 Fix size calculation error
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@459 42af7a65-404d-4744-a932-0658087f49c3
2007-12-29 20:18:34 +00:00
patacongo
36c2c9800f Fix dynamic heap sizing logic
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@458 42af7a65-404d-4744-a932-0658087f49c3
2007-12-29 19:51:39 +00:00
patacongo
0a98dad76d First successful z80 compile & link
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@457 42af7a65-404d-4744-a932-0658087f49c3
2007-12-29 16:31:25 +00:00
patacongo
e5cb54d8d5 Add z80 target
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@456 42af7a65-404d-4744-a932-0658087f49c3
2007-12-29 01:06:06 +00:00
patacongo
b1ac023250 Import of z80 target
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@455 42af7a65-404d-4744-a932-0658087f49c3
2007-12-29 01:05:26 +00:00
patacongo
98c638416d Fixed for 8051 w/SDCC compiler
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@454 42af7a65-404d-4744-a932-0658087f49c3
2007-12-28 22:10:14 +00:00
patacongo
932463210f Changes for SDCC compiler
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@453 42af7a65-404d-4744-a932-0658087f49c3
2007-12-28 01:44:34 +00:00
patacongo
26a0534734 Updated for 0.3.5
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@452 42af7a65-404d-4744-a932-0658087f49c3
2007-12-18 20:03:03 +00:00
patacongo
48a5b245df update
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@451 42af7a65-404d-4744-a932-0658087f49c3
2007-12-13 16:52:37 +00:00
patacongo
28b8f4a2e6 ifconfig shows uIP stats
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@450 42af7a65-404d-4744-a932-0658087f49c3
2007-12-12 14:41:36 +00:00
patacongo
cd2decaedb Need to preserve IP address from spurious OFFERs as well
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@449 42af7a65-404d-4744-a932-0658087f49c3
2007-12-11 23:10:47 +00:00
patacongo
bacff222e1 Fix typos/ommissions in file header
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@448 42af7a65-404d-4744-a932-0658087f49c3
2007-12-11 22:58:16 +00:00
patacongo
e0bee0e36b update
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@447 42af7a65-404d-4744-a932-0658087f49c3
2007-12-11 22:08:57 +00:00
patacongo
8027ff2a0e DHCPC logic changes - should now handle case with multiple DHCP servers
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@446 42af7a65-404d-4744-a932-0658087f49c3
2007-12-11 22:07:18 +00:00
patacongo
0800757e00 Need to tell examples/uip tht the C5471 has no MAC
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@445 42af7a65-404d-4744-a932-0658087f49c3
2007-12-11 22:04:35 +00:00
patacongo
a9a9fb489e Fix compilation errors
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@444 42af7a65-404d-4744-a932-0658087f49c3
2007-12-11 14:49:02 +00:00
patacongo
23e67efbbd Moved MAC and ethernet definitions to include/net/ethernet.h
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@443 42af7a65-404d-4744-a932-0658087f49c3
2007-12-11 14:28:16 +00:00
patacongo
ea50c50b47 eliminate some warnings
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@442 42af7a65-404d-4744-a932-0658087f49c3
2007-12-11 14:27:11 +00:00
patacongo
8ff7a809b4 Add ifconfig command to NSH
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@441 42af7a65-404d-4744-a932-0658087f49c3
2007-12-11 14:24:49 +00:00
patacongo
84ff909d06 Add ether_ntoa() and inet_ntoa()
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@440 42af7a65-404d-4744-a932-0658087f49c3
2007-12-11 14:23:58 +00:00
patacongo
15c9ab962a Add netdev_foreach()
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@439 42af7a65-404d-4744-a932-0658087f49c3
2007-12-11 14:23:16 +00:00
patacongo
4bd249117a Verified DHCPC on the C5471 EVM
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@438 42af7a65-404d-4744-a932-0658087f49c3
2007-12-10 19:39:26 +00:00
patacongo
69303fea5f Updates
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@437 42af7a65-404d-4744-a932-0658087f49c3
2007-12-10 17:41:40 +00:00
patacongo
a13244eeaf Release 0.3.4
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@436 42af7a65-404d-4744-a932-0658087f49c3
2007-12-10 17:15:11 +00:00
patacongo
32b30abf8f Workaround for ARM optimization bug: Use memcmp/memcpy when working with arrays
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@435 42af7a65-404d-4744-a932-0658087f49c3
2007-12-10 16:28:08 +00:00
patacongo
1a98fe8a63 Debugging TELNET NSH (still problems)
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@434 42af7a65-404d-4744-a932-0658087f49c3
2007-12-10 13:28:01 +00:00
patacongo
f09cdabc0d Clean compile with stats enabled
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@433 42af7a65-404d-4744-a932-0658087f49c3
2007-12-07 16:13:50 +00:00
patacongo
977d4d8779 C5471 ethernet driver functional (but sensitive)
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@432 42af7a65-404d-4744-a932-0658087f49c3
2007-12-07 15:19:00 +00:00
patacongo
47b3a226af C5471 ethernet debug
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@431 42af7a65-404d-4744-a932-0658087f49c3
2007-12-06 23:12:48 +00:00
patacongo
a932e62067 Improved read-ahead buffer management
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@430 42af7a65-404d-4744-a932-0658087f49c3
2007-12-06 23:10:31 +00:00
patacongo
cba8fa9596 Debug fixes
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@429 42af7a65-404d-4744-a932-0658087f49c3
2007-12-05 23:51:41 +00:00
patacongo
98f35925e5 Cosmetic
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@428 42af7a65-404d-4744-a932-0658087f49c3
2007-12-05 15:12:38 +00:00
patacongo
3988e65c46 Clarifications
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@427 42af7a65-404d-4744-a932-0658087f49c3
2007-12-05 01:27:17 +00:00
patacongo
1557e9befc Add feature set, trademarks
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@426 42af7a65-404d-4744-a932-0658087f49c3
2007-12-05 01:02:45 +00:00
patacongo
13505c52fc Add C5471 ethernet driver debug instrumentation
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@425 42af7a65-404d-4744-a932-0658087f49c3
2007-12-04 23:24:26 +00:00
patacongo
c3b6c26c1b First clean C5471 Ethernet compile
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@424 42af7a65-404d-4744-a932-0658087f49c3
2007-12-04 20:23:43 +00:00
patacongo
5efd8589a7 Add c5471 Ethernet driver
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@423 42af7a65-404d-4744-a932-0658087f49c3
2007-12-04 17:11:55 +00:00
patacongo
55358e04c8 Add skeleton ethernet driver
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@422 42af7a65-404d-4744-a932-0658087f49c3
2007-12-02 23:11:54 +00:00
patacongo
3e64d53637 Add TELNET front end to NSH
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@421 42af7a65-404d-4744-a932-0658087f49c3
2007-12-02 18:18:59 +00:00
patacongo
4c54d7d07e Add send() timeout logic
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@420 42af7a65-404d-4744-a932-0658087f49c3
2007-12-02 15:11:32 +00:00
patacongo
929a52b3e0 Basic DHPC client functionality
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@419 42af7a65-404d-4744-a932-0658087f49c3
2007-11-30 23:15:06 +00:00
patacongo
fedadd3064 correct handling of UDP broadcast
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@418 42af7a65-404d-4744-a932-0658087f49c3
2007-11-30 23:12:11 +00:00
patacongo
c3669a3104 Fix UDP recvfrom timeout logic
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@417 42af7a65-404d-4744-a932-0658087f49c3
2007-11-30 21:45:41 +00:00
patacongo
4ca632d1e6 Fix error in BROADCAST=y compilation
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@416 42af7a65-404d-4744-a932-0658087f49c3
2007-11-30 21:08:29 +00:00
patacongo
3dc55ecc72 Oops checked in debug version
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@415 42af7a65-404d-4744-a932-0658087f49c3
2007-11-30 20:50:48 +00:00
patacongo
6f89e7df29 Add netutils/dhcpd
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@414 42af7a65-404d-4744-a932-0658087f49c3
2007-11-30 20:47:42 +00:00
patacongo
5fe8b2974d Add examples/dhcpd
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@413 42af7a65-404d-4744-a932-0658087f49c3
2007-11-30 20:46:29 +00:00
patacongo
14dd3e6265 Prep for 0.3.3 release
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@412 42af7a65-404d-4744-a932-0658087f49c3
2007-11-28 18:31:33 +00:00
patacongo
77aca3e58f Remove commented out logic
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@411 42af7a65-404d-4744-a932-0658087f49c3
2007-11-28 18:17:04 +00:00
patacongo
a89062967e Improve send/close performance
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@410 42af7a65-404d-4744-a932-0658087f49c3
2007-11-28 15:25:09 +00:00
patacongo
34e4d846a6 Fixed missing logic in readahead buffer logic
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@409 42af7a65-404d-4744-a932-0658087f49c3
2007-11-27 19:19:30 +00:00
patacongo
c3a7c92677 Integrated uIP's TELNETD
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@408 42af7a65-404d-4744-a932-0658087f49c3
2007-11-25 16:50:16 +00:00
patacongo
a019c26daa Add vsnprintf
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@407 42af7a65-404d-4744-a932-0658087f49c3
2007-11-25 16:49:08 +00:00
patacongo
18e3cfd272 fs/ and lib/ debug can be selectively enabled
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@406 42af7a65-404d-4744-a932-0658087f49c3
2007-11-24 13:59:57 +00:00
patacongo
9a0b25efcd Must disconnect TCP socket on close()
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@405 42af7a65-404d-4744-a932-0658087f49c3
2007-11-24 13:02:03 +00:00
patacongo
b72a7ab50b Debug can now be selectively enabled by subystem
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@404 42af7a65-404d-4744-a932-0658087f49c3
2007-11-23 22:32:52 +00:00
patacongo
2d9b57758b Removed unused uIP files
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@403 42af7a65-404d-4744-a932-0658087f49c3
2007-11-23 21:16:43 +00:00
patacongo
2ce5085cc8 Verified recvfrom()
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@402 42af7a65-404d-4744-a932-0658087f49c3
2007-11-23 19:25:39 +00:00
patacongo
ef651cc6bc Debug UDP send logic
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@401 42af7a65-404d-4744-a932-0658087f49c3
2007-11-23 13:31:28 +00:00
patacongo
961336e574 Added UDP test/example
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@400 42af7a65-404d-4744-a932-0658087f49c3
2007-11-22 21:59:30 +00:00
patacongo
276e2880bd UDP test/example
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@399 42af7a65-404d-4744-a932-0658087f49c3
2007-11-22 21:57:38 +00:00
patacongo
5a508351e4 TCP and ICMP protocols may now be disabled
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@398 42af7a65-404d-4744-a932-0658087f49c3
2007-11-22 18:36:46 +00:00
patacongo
99c94d9cbe Add TX data notification
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@397 42af7a65-404d-4744-a932-0658087f49c3
2007-11-22 14:42:52 +00:00
patacongo
5c0768fb0d Use normal C strings
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@396 42af7a65-404d-4744-a932-0658087f49c3
2007-11-22 12:48:40 +00:00
patacongo
21c9f463a2 Fix confusion in listening socket vs accepted sockets
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@395 42af7a65-404d-4744-a932-0658087f49c3
2007-11-21 23:30:24 +00:00
patacongo
7d1031cc71 Fix leak in socket close
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@394 42af7a65-404d-4744-a932-0658087f49c3
2007-11-21 23:29:14 +00:00
patacongo
b54499d254 Fix parsing of URL
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@393 42af7a65-404d-4744-a932-0658087f49c3
2007-11-21 23:28:00 +00:00
patacongo
295bf51f3f Fix TCP list managment bug
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@392 42af7a65-404d-4744-a932-0658087f49c3
2007-11-20 21:55:06 +00:00
patacongo
ea2ca7bfc3 Several webserver bugs fixed
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@391 42af7a65-404d-4744-a932-0658087f49c3
2007-11-20 20:32:33 +00:00
patacongo
26c91f4733 Add strcat() and strncat()
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@390 42af7a65-404d-4744-a932-0658087f49c3
2007-11-20 15:42:11 +00:00
541 changed files with 40998 additions and 9076 deletions

112
ChangeLog
View File

@@ -215,7 +215,7 @@
* Added listen() and accept()
* Added DM90x0 ethernet driver
* ARP timer is now built into the network layer
* Basic client functionality verified: socket(), bind(), connect(), recv(), send().
* Basic client functionality verified: TCP socket(), bind(), connect(), recv(), send().
0.3.1 2007-11-19 Gregory Nutt <spudmonkey@racsa.co.cr>
@@ -223,10 +223,116 @@
* Corrected a TCP problem where packets were dropped because there was no
recv() in place but the packet was being ACKed. There are still TCP
recv buffering issues, but this is part of a larger buffering issue.
* Basic server functionality verified: listen(), accept()
* Basic server functionality verified: TCP listen(), accept()
* Fix DM90x0 driver problem that caused TX overruns
* Add strncmp()
* Added TCP/IP read-ahead buffer to minimize failed ACKs and packet loss.
0.3.2 2007-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr>
0.3.2 2007-11-23 Gregory Nutt <spudmonkey@racsa.co.cr>
* Add strcat() and strncat()
* Integrated uIP micro webserver
* Corrected a serious bug in TCP queue management
* Fix leak in socket close logic
* Add TX notification to driver so that it can respond faster to
the availability of TX data.
* Moved urgent data info into device structure.
* TCP and ICMP protocols can now be disabled.
* Added UDP test in examples/udp
* Verified/debugged UDP socket(), bind(), sendto() and recvfrom() logic
using examples/udp
* recvfrom() and accept() now correctly return the remote address.
* Fixed computation error in ntohl().
0.3.3 2007-11-28 Gregory Nutt <spudmonkey@racsa.co.cr>
* Removed unused uIP files
* sched/, mm/, and net/ subystem debug can not be selectively enabled/disabled
* Correct socket close logic -- needs to disconnect TCP socket on close
* uIP webserver now seems to be fully functional
* fs/ and lib/ subystem debug can not be selectively enabled/disabled
* Added vsnprintf
* Integrated uIP telnetd
* Add missing logic to readahead buffer logic
* examples/nettest uses larger buffers
* Improved ACK handling in send() to better hander deferred acknowledgements
and polling intervals. Greatly improves send performance.
0.3.4 2007-12-10 Gregory Nutt <spudmonkey@racsa.co.cr>
* Added and partially verified DHCP server logic (netutils/dhcpd)
* Fix BROADCAST=y compilation problems
* Fix UDP recvfrom timeout bug
* Correct processing of input UDP broadcast packets.
* Verfied basic DHCP client functionality (netutils/dhcpc)
* Implemented send() timeout logic
* Added and verifed a TELNETD front end to NSH (examples/nsh)
* Add a skeleton Ethernet device driver (drivers/net/skeleton.c)
* Added C5471 Ethernet device driver (arch/arm/src/c5471/c5471_ethernet.c)
* Found and fixed several problems in uIP when compiled for ARM with optimization.
0.3.5 2007-12-18 Gregory Nutt <spudmonkey@racsa.co.cr>
* Added inet_ntoa() and ether_ntoa()
* Added netdev_foreach() to support traversal of registered network devices
* Added support for 'ifconfig' command to NSH (examples/nsh)
* Moved MAC and ethernet definitions to net/ethernet.h
* Fix sim and DM90x0 compilation errors introduced in 0.3.4
* Fixed errors in C5471 configuration files for examples/uip
* Modified DHCPC (netutils/dhcpc) so that it should work in environments where
there are more than one DHCPD server.
* NSH ifconfig command now shows uIP status was well (examples/nsh)
0.3.6 2008-01-06 Gregory Nutt <spudmonkey@racsa.co.cr>
* Changes for use with SDCC compiler
* Added a simulated z80 target
* Fix deadlock errors when using stdio but with no buffering
* Add support for Pascal P-Code interpreter
0.3.6.1 2008-01-07 Gregory Nutt <spudmonkey@racsa.co.cr>
* The initial 0.3.6 release including an error that prevented
building successfully if the Pascal add-on was
was not present.
0.3.7 2008-01-31 Gregory Nutt <spudmonkey@racsa.co.cr>
* Added support for the Zilog Z16F using the Zilog Z16F2800100ZCOG
Development Kit.
* Add support toolchains that do not support making of dependencies
* Fix Cygwin build with spaces in directory names
* Name make system changes to deal with non-GNU toolchains (i.e., Zilog)
* Add support for Windows native toolchains that cannot follow Cygwin soft links
* Modified serial driver interface to handle hardware with non-16550A-like
interrupt architecture (like the Z16F)
* Added a "dumb" serial console driver to simplify OS bringup
* Corrected a bug that caused the errno value of one task to be clobbered
when a different task exits. Effects all architectures.
0.3.8 2008-02-10 Gregory Nutt <spudmonkey@racsa.co.cr>
* Added a test case to verify the Pascal P-Code interpreter
* Added /dev/zero
* 'errno' is now defined to be *get_errno_ptr() with no name conflicts
* Added lseek() and fseek()
* Integrated Pascal interpreter test case on the simulation platform. Needs
pascal-0.1.1.
* Add Pascal test case on the z16f platform. Needs pascal-0.1.2 (does not
yet work due to some tool issues).
* C buffered I/O fixes:
- Fix fflush() return value,
- Add correct fflush behavior when the FILE argument is null.
- Add logic to a correctly handle read/write access on the same FILE
- fseek() flushes read/write data when before moving the file pointer
- When read data is flushed, reposition the file pointer to account for
buffered, but unreand data
* Pascal P-Code files are now standardized to big-endian for portability
* Fix a build problem with z80 and SDCC 2.7.0 (format of a map file changed)
(see bug 1887170)
* Pascal P-Code runtime now compiles with the SDCC toolchain.
* Added a generic CAN driver. This driver is untested as of this writing.
* Corrected DM320 UART configuration problem
0.3.9 2008-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr>

File diff suppressed because it is too large Load Diff

View File

@@ -29,6 +29,11 @@
</tr>
</table>
</td>
<td width="210">
<a href="freeports.html" target="_blank">
<img src="freeports.gif" width="210" height="62" border="0"/>
</a>
</td>
</tr>
</body>
</html>
</html>

View File

@@ -16,7 +16,7 @@
</b></big>
<p><small>by</small></p>
<p>Gregory Nutt</p>
<p><small>Last Update: September 8, 2007</small></p>
<p><small>Last Update: February 7, 2008</small></p>
</center>
<center><h1>Table of Contents</h1></center>
@@ -36,7 +36,7 @@
<li><a href="#summaryofconfigfiles">2.3.2 Summary of Files</a></li>
<ul>
<li><a href="#boardlogic">2.3.2.1 Board Specific Logic</a></li>
<li><a href="#boardconfigfiles">2.3.2.2 Board Specific Configuration Files</a></li>
<li><a href="#boardconfigsubdirs">2.3.2.2 Board Specific Configuration Sub-Directories</a></li>
</ul>
<li><a href="#supportedboards">2.3.3 Supported Boards</a></li>
</ul>
@@ -88,14 +88,15 @@
<li><a href="#irqdispatch">4.2.4 <code>irq_dispatch()</code></a></li>
</ul>
</ul>
<li><a href="#NxFileSystem">5.0 NuttX File System</a></li>
<li><a href="#apndxconfigs">Appendix A: NuttX Configuration Settings</a></li>
<li><a href="#apndxtrademarks">Appendix B: Trademarks</a></li>
<hr>
<h1>1.0 <a name="Introduction">Introduction</a></h1>
<p><b>Overview</b>
This document provides and overview of the NuttX build and configuration
logic and provides hints for the incorporation of new processor/board archectures
logic and provides hints for the incorporation of new processor/board architectures
into the build.
</p>
<p>
@@ -131,7 +132,7 @@
| | | `-- <i>(chip-specific source files)</i>
| | |--<i>&lt;other-chips&gt;</i>/
| | `-- <i>(architecture-specific source files)</i>
| `-- <i>&lt;other-architectures&gt;</i>/
| `-- <i>&lt;other-architecture directories&gt;</i>/
|-- <a href="#DirStructConfigs">configs</a>/
| |-- <i>&lt;board-name&gt;</i>/
| | |-- include/
@@ -139,8 +140,10 @@
| | |-- src/
| | | |-- Makefile
| | | `-- <i>(board-specific source files)</i>
| | `-- <i>(board-specific configuration files)</i>
| `-- <i>&lt;other-boards&gt;</i>/
| | |---<i>&lt;config1-dir&gt;</i>/
| | | `-- <i>(board-specific/configuration-specific files)</i>
| | `---<i>(other board-specific configuration sub-directories)</i>/
| `-- <i>&lt;(other board directories)&gt;</i>/
|-- <a href="#DirStructDrivers">drivers</a>/
| |-- Makefile
| `-- <i>(common driver source files)</i>
@@ -225,14 +228,14 @@
</p>
</li>
<li>
<i>Board specific files</i>.
<i>Board specific configurations</i>.
In order to be usable, the chip must be contained in a board environment.
The board configuration defines additional properties of the board including such things as
peripheral LEDs, external peripherals (such as network, USB, etc.).
<p>
These board-specific configuration files can be found in the
<code>configs/</code><i>&lt;board-name&gt;</i><code>/</code> sub-directories and are discussed
in a a paragraph <a href="#configsdirectorystructure">below</a>.
in a paragraph <a href="#configsdirectorystructure">below</a>.
</p>
</li>
</ul>
@@ -250,8 +253,8 @@
This directory contains several sub-directories, each containing
architecture-specific logic.
The task of porting NuttX to a new processor consists of
add a new sudirectory under <code>arch/</code> containing logic specific
to the new architecuture.
add a new subdirectory under <code>arch/</code> containing logic specific
to the new architecture.
The complete board port in is defined by the architecture-specific code in this
directory (plus the board-specific configurations in the <code>config/</code>
subdirectory).
@@ -413,11 +416,22 @@
</li>
<li><code>arch/m68322</code>
A work in progress.</li>
A work in progress.
</li>
<li><code>arch/pjrc-8051</code>:
8051 Microcontroller. This port is not quite ready for prime time.</li>
8051 Microcontroller. This port is not quite ready for prime time.
</li>
<li><code>arch/z16f</code>:
Zilog z16f Microcontroller.
This port uses the Zilog z16f2800100zcog Development Kit.
This is a work in progress.
</li>
<li><code>arch/z80</code>:
Zilog z80 Microcontroller.
This port has been verified using only a z80 instruction simulator.
</li>
</ul>
@@ -456,15 +470,24 @@
provide a subdirectory &lt;board-name&gt; under <code>configs/</code> with the following characteristics:
</p>
<ul><pre>
|-- Make.defs
|-- defconfig
`-- setenv.sh
<i>&lt;board-name&gt;</i>
|-- include/
| `-- <i>(board-specific header files)</i>
|-- src/
| |-- Makefile
| `-- <i>(board-specific source files)</i>
|-- Make.defs
|-- defconfig
`-- setenv.sh
|-- <i>&lt;config1-dir&gt;</i>
| |-- Make.defs
| |-- defconfig
| `-- setenv.sh
|-- <i>&lt;config2-dir&gt;</i>
| |-- Make.defs
| |-- defconfig
| `-- setenv.sh
`-- <i>(other board-specific configuration sub-directories)</i>/
</pre></ul>
<h3><a name="summaryofconfigfiles">2.3.2 Summary of Files</a></h3>
@@ -490,10 +513,15 @@
It must support the following targets: <code>libext$(LIBEXT)</code>, <code>clean</code>, and <code>distclean</code>.
</li>
</ul>
<h4><a name="boardconfigfiles">2.3.2.2 Board Specific Configuration Files</a></h4>
<h4><a name="boardconfigsubdirs">2.3.2.2 Board Specific Configuration Sub-Directories</a></h4>
<p>
The <code>configs/</code><i>&lt;board-name&gt;</i><code>/</code> sub-directory holds all of the
files that are necessary to configure Nuttx for the particular board.
A board may have various different configurations using the common source files.
Each board configuration is described by three files: <code>Make.defs</code>, <code>defconfig</code>, and <code>setenv.sh</code>.
Typically, each set of configuration files is retained in a separate configuration sub-directory
(<i>&lt;config1-dir&gt;</i>, <i>&lt;config2-dir&gt;</i>, .. in the above diagram).
The procedure for configuring NuttX is described <a href="#configuringnuttx">below</a>,
This paragraph will describe the contents of these configuration files.
</p>
@@ -506,6 +534,7 @@
<ul>
<li>Tools: CC, LD, AR, NM, OBJCOPY, OBJDUMP</li>
<li>Tool options: CFLAGS, LDFLAGS</li>
<li>COMPILE, ASSEMBLE, ARCHIVE, CLEAN, and MKDEP macros</li>
</ul>
<p>
When this makefile fragment runs, it will be passed TOPDIR which
@@ -517,7 +546,7 @@
</li>
<li>
<code>defconfig</code>: This is a configuration file similar to the Linux
configuration file. In contains varialble/value pairs like:
configuration file. In contains variable/value pairs like:
<ul>
<li><code>CONFIG_VARIABLE</code>=value</li>
</ul>
@@ -555,20 +584,20 @@
This is a port to the Spectrum Digital C5471 evaluation board. The
C5471 is a dual core processor from TI with an ARM7TDMI general purpose
processor and a c54 SDP. NuttX runs on the ARM core and is built with
with a GNU arm-elf toolchain*. This port is complete, verified, and
included in the NuttX release.
with a GNU arm-elf toolchain* under Linux or Cygwin.
This port is complete, verified, and included in the NuttX release.
</li>
<li><code>configs/mcu123-lpc214x</code>:
This port is for the NXP LPC2148 as provided on the mcu123.com
lpc214x development board.
This OS is also built with the arm-elf toolchain*.
This OS is also built with the arm-elf toolchain* under Linux or Cygwin.
STATUS: This port is in progress and should be available in the
nuttx-0.2.5 release.
</li>
<li><code>configs/ntosd-dm320</code>:
This port uses the Neuros OSD with a GNU arm-elf toolchain*.
This port uses the Neuros OSD with a GNU arm-elf toolchain* under Linux or Cygwin.
See <a href="http://wiki.neurostechnology.com/index.php/Developer_Welcome">Neuros Wiki</a>
for futher information.
NuttX operates on the ARM9EJS of this dual core processor.
@@ -583,13 +612,28 @@
<li><code>configs/pjrc-8051</code>:
8051 Microcontroller. This port uses the PJRC 87C52 development system
and the SDCC toolchain. This port is not quite ready for prime time.
and the <a href="http://sdcc.sourceforge.net/">SDCC</a> toolchain under Linux or Cygwin.
This port is not quite ready for prime time.
</li>
<li><code>configs/z16f2800100zcog</code>
z16f Microncontroller.
This port use the Zilog z16f2800100zcog development kit and the
Zilog ZDS-II Windows command line tools.
The development environment is Cygwin under WinXP.
<li><code>configs/z80sim</code>:
z80 Microcontroller. This port uses a Z80 instruction set simulator.
That simulator can be found in the NuttX CVS
<a href="http://nuttx.cvs.sourceforge.net/nuttx/misc/sims/z80sim/">here</a>.
This port also the <a href="http://sdcc.sourceforge.net/">SDCC</a> toolchain
under Linux or Cygwin(verfied with version 2.6.0).
</li>
</ul>
<p><small><blockquote>
* A customized version of the <a href="http://www.buildroot.org">buildroot</a>
is available to build these toolchains.
is available to build these toolchains under Linux or Cygwin.
</blockquote></small></p>
<h2>2.4 <a name="DirStructDrivers">drivers</a></h2>
@@ -607,13 +651,8 @@
<h2>2.6 <a name="DirStructFs">fs</a></h2>
<p>
This directory contains the NuttX filesystem.
The NuttX filesystem is very simple; it does not involve any block drivers or
particular filesystem (like FAT or EXT2 etc.).
The NuttX filesystem simply supports a set a filesystem APIs
(<code>open()</code>, <code>close()</code>, <code>read()</code>, <code>write</code>, etc.)
and a registration mechanism that allows devices drivers to a associated with <i>nodes</i>
in a file-system-like name space.
This directory contains the NuttX file system.
This file system is described <a href="#NxFileSystem">below</a>.
</p>
<h2>2.7 <a name="DirStructInclude">include</a></h2>
@@ -674,19 +713,20 @@
<p>
<b>Manual Configuration</b>.
Configuring NuttX requires only copying the
<a href="#boardconfigfiles">board-specific configuration files</a> into the top level directory which appears in the make files as the make variable, <code>${TOPDIR}</code>.
<a href="#boardconfigsubdirs">board-specific configuration files</a> into the top level directory which appears in the make files as the make variable, <code>${TOPDIR}</code>.
This could be done manually as follows:
</p>
<ul>
<li>Copy <code>configs/</code><i>&lt;board-name&gt;</i></code>/Make.def</code> to <code>${TOPDIR}/Make.defs</code>,<li>
<li>Copy <code>configs/</code><i>&lt;board-name&gt;</i></code>/setenv.sh</code> to <code>${TOPDIR}/setenv.sh</code>, and</li>
<li>Copy <code>configs/</code><i>&lt;board-name&gt;</i></code>/defconfig</code> to <code>${TOPDIR}/.config</code></li>
<li>Copy <code>configs/</code><i>&lt;board-name&gt;</i><code>/[</code><i>&lt;config-dir&gt;</i><code>/]Make.def</code> to <code>${TOPDIR}/Make.defs</code>,<li>
<li>Copy <code>configs/</code><i>&lt;board-name&gt;</i><code>/[</code><i>&lt;config-dir&gt;</i><code>/]setenv.sh</code> to <code>${TOPDIR}/setenv.sh</code>, and</li>
<li>Copy <code>configs/</code><i>&lt;board-name&gt;</i><code>/[</code><i>&lt;config-dir&gt;</i><code>/]defconfig</code> to <code>${TOPDIR}/.config</code></li>
</ul>
<p>
Where <i>&lt;board-name&gt;</i> is the name of one of the sub-directories of the
NuttX <a href="#DirStructConfigs"><code>configs/</code></a> directory.
This sub-directory name corresponds to one of the supported boards
identified <a href="#supportedboards">above</a>.
And &lt;config-dir&gt; is the optional, specific configuration directory for the board.
</p>
<p>
<b>Automated Configuration</b>.
@@ -695,7 +735,7 @@
</p>
<ul><pre>
cd tools
./configure.sh <i>&lt;board-name&gt;</i>
./configure.sh <i>&lt;board-name&gt;</i></i><code>[/</code><i>&lt;config-dir&gt;</i><code>]</code>
</pre></ul>
<p>
@@ -724,14 +764,14 @@ make
That directory also holds:
</p>
<ul>
<li>The makefile fragment <a href="#boardconfigfiles"><code>.config</code></a> that describes the current configuration.</li>
<li>The makefile fragment <a href="#boardconfigfiles"><code>Make.defs</code></a> that provides customized build targers, and</li>
<li>The shell script <a href="#boardconfigfiles"><code>setenv.sh</code></a> that sets up the configuration environment for the build.</li>
<li>The makefile fragment <a href="#boardconfigsubdirs"><code>.config</code></a> that describes the current configuration.</li>
<li>The makefile fragment <a href="#boardconfigsubdirs"><code>Make.defs</code></a> that provides customized build targers, and</li>
<li>The shell script <a href="#boardconfigsubdirs"><code>setenv.sh</code></a> that sets up the configuration environment for the build.</li>
</ul>
<p>
The <a href="#boardconfigfiles"><code>setenv.sh</code></a> contains Linux environmental settings that are needed for the build.
The specific environmental definitions are unique for each board but should include, as a minimum, updates to the <code>PATH</code> variable to include the full path to the architecture-specific toolchain identified in <a href="#boardconfigfiles"><code>Make.defs</code></a>.
The <a href="#boardconfigfiles"><code>setenv.sh</code></a> only needs to be source'ed at the beginning of a session.
The <a href="#boardconfigsubdirs"><code>setenv.sh</code></a> contains Linux/Cygwin environmental settings that are needed for the build.
The specific environmental definitions are unique for each board but should include, as a minimum, updates to the <code>PATH</code> variable to include the full path to the architecture-specific toolchain identified in <a href="#boardconfigsubdirs"><code>Make.defs</code></a>.
The <a href="#boardconfigsubdirs"><code>setenv.sh</code></a> only needs to be source'ed at the beginning of a session.
The system can be re-made subsequently by just typing <code>make</code>.
</p>
<p>
@@ -1144,6 +1184,56 @@ The system can be re-made subsequently by just typing <code>make</code>.
the appropriate, registered handling logic.
</p>
<h1><a name="NxFileSystem">5.0 NuttX File System</a></h1>
<p><b>Overview</b>.
NuttX includes an optional, scalable file system.
This file-system may be omitted altogther; NuttX does not depend on the presence
of any file system.
</p>
<p><b>Pseudo Root File System</b>.
Or, a simple <i>in-memory</i>, <i>psuedo</i> file system can be enabled.
This simple file system can be enabled setting the CONFIG_NFILE_DESCRIPTORS
option to a non-zero value (see <a href="#apndxconfigs">Appendix A</a>).
This is an <i>in-memory</i> file system because it does not require any
storage medium or block driver support.
Rather, file system contents are generated on-the-fly as referenced via
standard file system operations (open, close, read, write, etc.).
In this sense, the file system is <i>psuedo</i> file system (in the
same sense that the Linux <code>/proc</code> file system is also
referred to as a psuedo file system).
</p>
<p>
Any user supplied data or logic can be accessed via the psuedo-file system.
Built in support is provided for character and block drivers in the
<code>/dev</code> psuedo file system directory.
</p>
<p><b>Mounted File Systems</b>
The simple in-memory file system can be extended my mounting block
devices that provide access to true file systems backed up via some
mass storage device.
NuttX supports the standard <code>mount()</code> command that allows
a block driver to be bound to a mountpoint within the psuedo file system
and to a a file system.
At present, NuttX supports only the VFAT file system.
</p>
<p><b>Comparison to Linux</b>
From a programming perspective, the NuttX file system appears very similar
to a Linux file system.
However, there is a fundamental difference:
The NuttX root file system is a psuedo file system and true file systems may be
mounted in the psuedo file system.
In the typical Linux installation by comparison, the Linux root file system
is a true file system and psuedo file systems may be mounted in the true,
root file system.
The approach selected by NuttX is intended to support greater scalability
from the very tiny platform to the moderate platform.
</p>
<h1><a name="apndxconfigs">Appendix A: NuttX Configuration Settings</a></h1>
<p>
@@ -1186,6 +1276,16 @@ The system can be re-made subsequently by just typing <code>make</code>.
The startaddress of DRAM (virtual)</li>
</ul>
<p>
General build options:
</p>
<ul>
<li><code>CONFIG_RRLOAD_BINARY</code>:
Make the rrload binary format used with BSPs from <a href="www.ridgerun.com">ridgerun.com</a>.</li>
<li><code>CONFIG_HAVE_LIBM</code>:
Toolchain supports libm.a</li>
</ul>
<h2>General OS setup</h2>
<ul>
@@ -1199,6 +1299,21 @@ The system can be re-made subsequently by just typing <code>make</code>.
<li>
<code>CONFIG_DEBUG_VERBOSE</code>: enables verbose debug output
</li>
<li>
<code>CONFIG_DEBUG_SCHED</code>: enable OS debug output (disabled by default)
</li>
<li>
<code>CONFIG_DEBUG_MM</code>: enable memory management debug output (disabld by default)
</li>
<li>
<code>CONFIG_DEBUG_NET</code>: enable network debug output (disabled by default)
</li>
<li>
<code>CONFIG_DEBUG_FS</code>: enable file system debug output (disabled by default)
</li>
<li>
<code>CONFIG_DEBUG_LIB</code>: enable C library debug output (disabled by default)
</li>
<li>
<code>CONFIG_HAVE_LOWPUTC</code>: architecture supports low-level, boot
time console output
@@ -1352,24 +1467,32 @@ The system can be re-made subsequently by just typing <code>make</code>.
<li>
<code>CONFIG_NSOCKET_DESCRIPTORS</code>: Maximum number of socket descriptors per task/thread.
</li>
<li>
<code>CONFIG_NET_TCP_CONNS</code>: Maximum number of TCP connections (all tasks).
</li>
<li>
<code>CONFIG_NET_MAX_LISTENPORTS</code>: Maximum number of listening TCP ports (all tasks).
</li>
<li>
<code>CONFIG_NET_SOCKOPTS</code>: Enable or disable support for socket options.
</li>
<li>
<code>CONFIG_NET_BUFSIZE</code>: uIP buffer size
</li>
<li>
<code>CONFIG_NET_TCP</code>: TCP support on or off
</li>
<li>
<code>CONFIG_NET_TCP_CONNS</code>: Maximum number of TCP connections (all tasks).
</li>
<li>
<code>CONFIG_NET_TCP_READAHEAD_BUFSIZE</code>: Size of TCP read-ahead buffers
</li>
<li>
<code>CONFIG_NET_NTCP_READAHEAD_BUFFERS</code>: Number of TCP read-ahead buffers (may be zero)
</li>
<li>
<code>CONFIG_NET_MAX_LISTENPORTS</code>: Maximum number of listening TCP ports (all tasks).
</li>
<li>
<code>CONFIG_NET_TCPURGDATA</code>: Determines if support for TCP urgent data
notification should be compiled in. Urgent data (out-of-band data)
is a rarely used TCP feature that is very seldom would be required.
</li>
<li>
<code>CONFIG_NET_UDP</code>: UDP support on or off
</li>
@@ -1380,11 +1503,14 @@ The system can be re-made subsequently by just typing <code>make</code>.
<code>CONFIG_NET_UDP_CONNS</code>: The maximum amount of concurrent UDP connections
</li>
<li>
<code>CONFIG_NET_STATISTICS</code>: uIP statistics on or off
<code>CONFIG_NET_ICMP</code>: ICMP ping support on or off
</li>
<li>
<code>CONFIG_NET_PINGADDRCONF</code>: Use "ping" packet for setting IP address
</li>
<li>
<code>CONFIG_NET_STATISTICS</code>: uIP statistics on or off
</li>
<li>
<code>CONFIG_NET_RECEIVE_WINDOW</code>: The size of the advertised receiver's window
</li>
@@ -1439,6 +1565,22 @@ The system can be re-made subsequently by just typing <code>make</code>.
</li>
</ul>
<h1><a name="apndxtrademarks">Appendix B: Trademarks</a></h1>
<li>ARM, ARM7 ARM7TDMI, ARM9, ARM926EJS are trademarks of Advanced RISC Machines, Limited.</li>
<li>Cygwin is a trademark of Red Hat, Incorporated.</li>
<li>Linux is a registered trademark of Linus Torvalds.</li>
<li>LPC2148 is a trademark of NXP Semiconductors.</li>
<li>TI is a tradename of Texas Instruments Incorporated.</li>
<li>UNIX is a registered trademark of The Open Group.</li>
<li>VxWorks is a registered trademark of Wind River Systems, Incorporated.</li>
<li>ZDS, ZNEO, Z16F, Z80, and Zilog are a registered trademark of Zilog, Inc.</li>
<p>
NOTE: NuttX is <i>not</i> licensed to use the POSIX trademark. NuttX uses the POSIX
standard as a development guideline only.
</p>
</body>
</html>

View File

@@ -21,7 +21,7 @@ User's Manual
<p>
Gregory Nutt
<p>
<small>Last Update: September 23, 2007</small>
<small>Last Update: Februrary 2, 2008</small>
</center>
<h1>1.0 <A NAME="Introduction">Introduction</a></h1>
@@ -54,7 +54,7 @@ Gregory Nutt
<li>Paragraph 2.8 <a href="#Signals">Signal Interfaces</a></li>
<li>Paragraph 2.9 <a href="#Pthread">Pthread Interfaces</a></li>
<li>Paragraph 2.10 <a href="#Environ">Environment Variables</a></li>
<li>Paragraph 2.11 <a href="#FileSystem">Filesystem Interfaces</a></li>
<li>Paragraph 2.11 <a href="#FileSystem">File System Interfaces</a></li>
<li>Paragraph 2.12 <a href="#Network">Network Interfaces</a></li>
</ul>
</li>
@@ -62,9 +62,15 @@ Gregory Nutt
<b>Section 3.0, <a href="#Data_Structures">OS Data Structures</a></b>:
This section documents the data structures that are used at the NuttX
interface.
<ul>
<li>Paragraph 3.1 <a href="#ScalarType">Scalar Types</a></li>
<li>Paragraph 3.2 <a href="#HiddenStructures">Hidden Interface Structures</a></li>
<li>Paragraph 3.3 <a href="#ErrnoAccess">Access to the <code>errno</code> Variable</a></li>
<li>Paragraph 3.4 <a href="#UserStructures">User Interface Structures</a></li>
</ul>
</li>
<li>
<a href="#index">Index</a>
<a href="#index"><b>Index</b></a>
</li>
</ul>
@@ -227,7 +233,7 @@ paragraphs.
<li>
Returns the non-zero task ID of the new task or
ERROR if memory is insufficient or the task cannot be
created (errno is not set).
created (<a href="#ErrnoAccess"><code>errno</code></a> is not set).
</LI>
</ul>
@@ -296,7 +302,7 @@ VxWorks provides the following similar interface:
<ul>
<li><p>OK, or ERROR if the task cannot be initialized.</P>
<p>This function can only failure is it is unable to assign
a new, unique task ID to the TCB (errno is not set).</P>
a new, unique task ID to the TCB (<a href="#ErrnoAccess"><code>errno</code></a> is not set).</P>
</ul>
<p>
<b>Assumptions/Limitations:</b>
@@ -348,7 +354,7 @@ task_init argument).
<p>
<b>Returned Values:</b>
<ul>
<li>OK, or ERROR if the task cannot be activated (errno is not set).
<li>OK, or ERROR if the task cannot be activated (<a href="#ErrnoAccess"><code>errno</code></a> is not set).
</ul>
<p>
@@ -399,7 +405,7 @@ zero signifies the calling task.
<b>Returned Values:</b>
<ul>
<li>OK, or ERROR if the task cannot be deleted.
This function can fail if the provided pid does not correspond to a task (errno is not set)
This function can fail if the provided pid does not correspond to a task (<a href="#ErrnoAccess"><code>errno</code></a> is not set)
</ul>
<p>
@@ -613,7 +619,7 @@ Compatible with the POSIX interface of the same name.
<p>
<b>Returned Values:</b>
On success, sched_setparam() returns 0 (OK).
On error, -1 (ERROR) is returned, and<code>errno</code>is set appropriately.
On error, -1 (ERROR) is returned, and <a href="#ErrnoAccess"><code>errno</code></a> is set appropriately.
</p>
<ul>
@@ -714,7 +720,7 @@ interface of the same name.
<p>
<b>Returned Values:</b>
On success, <i>sched_setscheduler()</i> returns OK (zero). On
error, ERROR (-1) is returned, and<code>errno</code>is set appropriately:
error, ERROR (-1) is returned, and <a href="#ErrnoAccess"><code>errno</code></a> is set appropriately:
</p>
<ul>
<li>EINVAL The scheduling policy is not one of the
@@ -762,7 +768,7 @@ policy.
<li>
On success, <i>sched_getscheduler()</i> returns the policy for
the task (either SCHED_FIFO or SCHED_RR).
On error, ERROR (-1) is returned, and<code>errno</code>is set appropriately:
On error, ERROR (-1) is returned, and <a href="#ErrnoAccess"><code>errno</code></a> is set appropriately:
<ul>
<li>ESRCH The task whose ID is pid could not be found.</li>
</ul>
@@ -775,7 +781,7 @@ policy.
interface of the same name.
Differences from the full POSIX implementation include:
<ul>
<li>Does not report errors via <I>errno</I>.
<li>Does not report errors via <a href="#ErrnoAccess"><code>errno</code></a>.
</ul>
<H3><a name="sched_yield">2.2.5 sched_yield</a></H3>
@@ -894,7 +900,7 @@ priority of the calling task is returned.
<p>
<b>Returned Values:</b>
On success, sched_rr_get_interval() returns OK (0). On
error, ERROR (-1) is returned, and<code>errno</code>is set to:
error, ERROR (-1) is returned, and <a href="#ErrnoAccess"><code>errno</code></a> is set to:
</p>
<ul>
<li>EFAULT Cannot copy to interval</LI>
@@ -1216,7 +1222,7 @@ interface of the same name.
<p>
<b>Returned Values:</b>
On success, <code>mq_send()</code> returns 0 (<code>OK</code>);
on error, -1 (<code>ERROR</code>) is returned, with <code>errno</code> set
on error, -1 (<code>ERROR</code>) is returned, with <a href="#ErrnoAccess"><code>errno</code></a> set
to indicate the error:
</p>
<ul>
@@ -1299,7 +1305,7 @@ interface of the same name.
<p>
<b>Returned Values:</b>
On success, <code>mq_send()</code> returns 0 (<code>OK</code>);
on error, -1 (<code>ERROR</code>) is returned, with <code>errno</code> set
on error, -1 (<code>ERROR</code>) is returned, with <a href="#ErrnoAccess"><code>errno</code></a> set
to indicate the error:
</p>
<ul>
@@ -1370,7 +1376,7 @@ interface of the same name.
<p>
<b>Returned Values:</b>.
One success, the length of the selected message in bytes is returned.
On failure, -1 (<code>ERROR</code>) is returned and the <code>errno</code> is set appropriately:
On failure, -1 (<code>ERROR</code>) is returned and the <a href="#ErrnoAccess"><code>errno</code></a> is set appropriately:
</p>
<ul>
<li>
@@ -1451,7 +1457,7 @@ interface of the same name.
<p>
<b>Returned Values:</b>.
One success, the length of the selected message in bytes is returned.
On failure, -1 (<code>ERROR</code>) is returned and the <code>errno</code> is set appropriately:
On failure, -1 (<code>ERROR</code>) is returned and the <a href="#ErrnoAccess"><code>errno</code></a> is set appropriately:
</p>
<ul>
<li>
@@ -1516,7 +1522,7 @@ registration.
<li><I>mqdes</I>. Message queue descriptor
<li><I>notification</I>. Real-time signal structure containing:
<ul>
<li><I>sigev_notify</I>. Should be osSIGEV_SIGNAL (but actually
<li><I>sigev_notify</I>. Should be SIGEV_SIGNAL (but actually
ignored)
<li><I>sigev_signo</I>. The signo to use for the notification
<li><I>sigev_value</I>. Value associated with the signal
@@ -1951,9 +1957,8 @@ the lock or the call is interrupted by a signal.
</ul>
<p>
If <I>sem_wait</I> returns -1 (ERROR) then the cause of the failure
will be indicated by the thread-specific <I>errno</I> value (a pointer
to this value can be obtained using <I>get_errno_ptr()</I>). The following
lists the possible values for <I>errno</I>:
will be indicated by the thread-specific <a href="#ErrnoAccess"><code>errno</code></a>.
The following lists the possible values for <a href="#ErrnoAccess"><code>errno</code></a>:
<p>
<ul>
<li><I>EINVAL</I>: Indicates that the <I>sem</I> input parameter is
@@ -1992,9 +1997,8 @@ returns without blocking.
<li>0 (OK) or -1 (ERROR) if unsuccessful
</ul>
If <I>sem_wait</I> returns -1 (ERROR) then the cause of the failure
will be indicated by the thread-specific <I>errno</I> value (a pointer
to this value can be obtained using <I>get_errno_ptr()</I>). The following
lists the possible values for <I>errno</I>:
will be indicated by the thread-specific <a href="#ErrnoAccess"><code>errno</code></a>.
The following lists the possible values for <a href="#ErrnoAccess"><code>errno</code></a>:
<p>
<ul>
<li><I>EINVAL</I>: Indicates that the <I>sem</I> input parameter is
@@ -2522,7 +2526,7 @@ VxWorks provides the following comparable interface:
If the call succeeds, <code>timer_create()</code> will return 0 (<code>OK</code>) and update the
location referenced by <code>timerid</code> to a <code>timer_t</code>, which can be passed to the
other per-thread timer calls. If an error occurs, the function will return
a value of -1 (<code>ERROR</code>) and set<code>errno</code>to indicate the error.
a value of -1 (<code>ERROR</code>) and set <a href="#ErrnoAccess"><code>errno</code></a> to indicate the error.
</p>
<ul>
<li><code>EAGAIN</code>. The system lacks sufficient signal queuing resources to honor the
@@ -2570,7 +2574,8 @@ VxWorks provides the following comparable interface:
</p>
<p>
If successful, the <I>timer_delete()</I> function will return zero (<I>OK</I>).
Otherwise, the function will return a value of -1 (ERROR) and set<code>errno</code>to indicate the error:
Otherwise, the function will return a value of -1 (ERROR) and set
<a href="#ErrnoAccess"><code>errno</code></a> to indicate the error:
</p>
<ul>
<li><code>EINVAL</code>. The timer specified timerid is not valid.</li>
@@ -2647,7 +2652,8 @@ VxWorks provides the following comparable interface:
</p>
<p>
If the timer_gettime() succeeds, a value of 0 (OK) will be returned.
If an error occurs, the value -1 (ERROR) will be returned, and<code>errno</code>set to indicate the error.
If an error occurs, the value -1 (ERROR) will be returned, and
<a href="#ErrnoAccess"><code>errno</code></a> set to indicate the error.
</p>
<ul>
<li><code>EINVAL</code>. The timerid argument does not correspond to an ID returned by timer_create() but not yet deleted by timer_delete().</li>
@@ -3065,12 +3071,12 @@ If sigprocmask() fails, the signal mask of the task is not changed.
<ul>
<li><I>how</I>. How the signal mast will be changed:
<ul>
<li><I>osSIG_BLOCK</I>. The resulting set is the union of the
<li><I>SIG_BLOCK</I>. The resulting set is the union of the
current set and the signal set pointed to by the <I>set</I> input parameter.
<li><I>osSIG_UNBLOCK</I>. The resulting set is the intersection
<li><I>SIG_UNBLOCK</I>. The resulting set is the intersection
of the current set and the complement of the signal set pointed
to by the <I>set</I> input parameter.
<li><I>osSIG_SETMASK</I>. The resulting set is the signal set
<li><I>SIG_SETMASK</I>. The resulting set is the signal set
pointed to by the <I>set</I> input parameter.
</ul>
@@ -3280,7 +3286,7 @@ the unblocked signal is ignored.
<b>Function Prototype:</b>
<pre>
#include &lt;signal.h&gt;
int sigqueue (int tid, int signo, const union sigval value);
int sigqueue (int tid, int signo, union sigval value);
</pre>
<p>
@@ -3307,7 +3313,7 @@ is delivered more than once.&quot;
<ul>
<li>
On success (at least one signal was sent), zero (OK) is returned.
On error, -1 (ERROR) is returned, and<code>errno</code>is set appropriately.
On error, -1 (ERROR) is returned, and <a href="#ErrnoAccess"><code>errno</code></a> is set appropriately.
<ul>
<li><code>EGAIN</code>. The limit of signals which may be queued has been reached.</li>
<li><code>EINVAL</code>. signo was invalid.</li>
@@ -5687,11 +5693,58 @@ interface of the same name.
Zero on success.
</p>
<h1><a name="FileSystem">2.11 Filesystem Interfaces</a></h1>
<h1><a name="FileSystem">2.11 File System Interfaces</a></h1>
<p><b>Overview</b>.
NuttX includes an optional, scalable file system.
This file-system may be omitted altogther; NuttX does not depend on the presence
of any file system.
</p>
<p><b>Pseudo Root File System</b>.
Or, a simple <i>in-memory</i>, <i>psuedo</i> file system can be enabled.
This simple file system can be enabled setting the CONFIG_NFILE_DESCRIPTORS
option to a non-zero value.
This is an <i>in-memory</i> file system because it does not require any
storage medium or block driver support.
Rather, file system contents are generated on-the-fly as referenced via
standard file system operations (open, close, read, write, etc.).
In this sense, the file system is <i>psuedo</i> file system (in the
same sense that the Linux <code>/proc</code> file system is also
referred to as a psuedo file system).
</p>
<p>
The NuttX filesystem is very simple; it does not involve any block drivers or
particular filesystem (like FAT or EXT2 etc.).
The NuttX filesystem simply supports a set a filesystem APIs
Any user supplied data or logic can be accessed via the psuedo-file system.
Built in support is provided for character and block drivers in the
<code>/dev</code> psuedo file system directory.
</p>
<p><b>Mounted File Systems</b>
The simple in-memory file system can be extended my mounting block
devices that provide access to true file systems backed up via some
mass storage device.
NuttX supports the standard <code>mount()</code> command that allows
a block driver to be bound to a mountpoint within the psuedo file system
and to a a file system.
At present, NuttX supports only the VFAT file system.
</p>
<p><b>Comparison to Linux</b>
From a programming perspective, the NuttX file system appears very similar
to a Linux file system.
However, there is a fundamental difference:
The NuttX root file system is a psuedo file system and true file systems may be
mounted in the psuedo file system.
In the typical Linux installation by comparison, the Linux root file system
is a true file system and psuedo file systems may be mounted in the true,
root file system.
The approach selected by NuttX is intended to support greater scalability
from the very tiny platform to the moderate platform.
</p>
<p><b>File System Interfaces</b>.
The NuttX file system simply supports a set of standard, file system APIs
(<code>open()</code>, <code>close()</code>, <code>read()</code>, <code>write</code>, etc.)
and a registration mechanism that allows devices drivers to a associated with <i>nodes</i>
in a file-system-like name space.
@@ -5813,7 +5866,7 @@ Those socket APIs are discussed in the following paragraphs.</p>
</ul>
<p>
<b>Returned Values:</b>
0 on success; -1 on error with<code>errno</code>set appropriately:
0 on success; -1 on error with <a href="#ErrnoAccess"><code>errno</code></a> set appropriately:
</p>
<ul>
<li><code>EACCES</code>.
@@ -5859,7 +5912,7 @@ Those socket APIs are discussed in the following paragraphs.</p>
</ul>
<p>
<b>Returned Values:</b>
0 on success; -1 on error with<code>errno</code>set appropriately:
0 on success; -1 on error with <a href="#ErrnoAccess"><code>errno</code></a> set appropriately:
</p>
<ul>
<li><code>EACCES</code>
@@ -5914,7 +5967,7 @@ Those socket APIs are discussed in the following paragraphs.</p>
</ul>
<p>
<b>Returned Values:</b>
0 on success; -1 on error with<code>errno</code>set appropriately:
0 on success; -1 on error with <a href="#ErrnoAccess"><code>errno</code></a> set appropriately:
</p>
<li><code>EACCES</code> or </code>EPERM</code>:
The user tried to connect to a broadcast address without having the
@@ -5981,7 +6034,8 @@ Those socket APIs are discussed in the following paragraphs.</p>
</ul>
<p>
<b>Returned Values:</b>
On success, zero is returned. On error, -1 is returned, and errno is set appropriately.
On success, zero is returned. On error, -1 is returned, and
<a href="#ErrnoAccess"><code>errno</code></a> is set appropriately.
</p>
<ul>
<li><code>EADDRINUSE</code>: Another socket is already listening on the same port.</li>
@@ -6130,7 +6184,8 @@ Those socket APIs are discussed in the following paragraphs.</p>
</ul>
<p>
<b>Returned Values:</b>
On success, returns the number of characters sent. On error, -1 is returned, and<code>errno</code>is set appropriately:
On success, returns the number of characters sent. On error, -1 is returned,
and <a href="#ErrnoAccess"><code>errno</code></a> is set appropriately:
</p>
<ul>
<li><code>EAGAIN</code> or <code>EWOULDBLOCK</code>.
@@ -6237,7 +6292,7 @@ Those socket APIs are discussed in the following paragraphs.</p>
<p>
<b>Returned Values:</b>
On success, returns the number of characters sent.
On error, -1 is returned, and errno is set appropriately:
On error, -1 is returned, and <a href="#ErrnoAccess"><code>errno</code></a> is set appropriately:
</p>
<ul>
<li><code>EAGAIN</code>.
@@ -6301,7 +6356,7 @@ Those socket APIs are discussed in the following paragraphs.</p>
<p>
<b>Returned Values:</b>
On success, returns the number of characters sent.
On error, -1 is returned, and errno is set appropriately:
On error, -1 is returned, and <a href="#ErrnoAccess"><code>errno</code></a> is set appropriately:
</p>
<ul>
<li><code>BADF</code>.
@@ -6364,7 +6419,7 @@ Those socket APIs are discussed in the following paragraphs.</p>
<p>
<b>Returned Values:</b>
On success, returns the number of characters sent.
On error, -1 is returned, and errno is set appropriately:
On error, -1 is returned, and <a href="#ErrnoAccess"><code>errno</code></a> is set appropriately:
</p>
<ul>
<li><code>BADF</code>.
@@ -6381,8 +6436,8 @@ Those socket APIs are discussed in the following paragraphs.</p>
</ul>
<hr>
<h1>3.0 <A NAME="Data_Structures">OS Data Structures</a></h1>
<H2>3.1 Scalar types</H2>
<h1>3.0 <A NAME="Data_Structures">OS Data Structures</A></h1>
<H2>3.1 <A NAME="ScalarType">Scalar Types</A></H2>
<p>
Many of the types used to communicate with NuttX are simple
scalar types. These types are used to provide architecture independence
@@ -6396,7 +6451,7 @@ interface include:
<li>time_t
</ul>
<H2>3.2 Hidden Interface Structures</H2>
<H2>3.2 <A NAME="HiddenStructures">Hidden Interface Structures</A></H2>
<p>
Several of the types used to interface with NuttX are
structures that are intended to be hidden from the application.
@@ -6411,37 +6466,47 @@ OS resources. These hidden structures include:
<li>pthread_key_t
</ul>
<p>
In order to maintain portability, applications should not reference
specific elements within these hidden structures. These hidden
structures will not be described further in this user's manual.
In order to maintain portability, applications should not reference
specific elements within these hidden structures. These hidden
structures will not be described further in this user's manual.
</p>
<p>
<H2>3.3. Access to the <I>errno</I> Variable</H2>
<H2>3.3 <A NAME="ErrnoAccess">Access to the <code>errno</code> Variable</A></H2>
<p>
A pointer to the thread-specific <I>errno</I>. value is available through a
function call:
A pointer to the thread-specific <code>errno</code> value is available through a
function call:
</p>
<p>
<b>Function Prototype:</b>
<b>Function Prototype:</b>
<p>
<pre> int *get_errno_ptr( void )</pre>
<pre> #include <errno.h>
#define errno *get_errno_ptr()
int *get_errno_ptr( void )</pre>
<p>
<b>Description</b>: <I>osGetErrnorPtr()</I> returns a pointer to
the thread-specific <I>errno</I> value.
<b>Description</b>:
<code>get_errno_ptr()</code> returns a pointer to the thread-specific <code>errno</code> value.
Note that the symbol <code>errno</code> is defined to be <code>get_errno_ptr()</code> so that the usual
access by referencing the symbol <code>errno</code> will work as expected.
</p>
<p>
This differs somewhat from the use for<code>errno</code>in a multi-threaded process environment:
Each pthread will have its own private copy of<code>errno</code>and the<code>errno</code>will not be shared
between pthreads.
There is a unique, private <code>errno</code> value for each NuttX task.
However, the implementation of <code>errno</code> differs somewhat from the use of
<code>errno</code> in most multi-threaded process environments:
In NuttX, each pthread will also have its own private copy of <code>errno</code> and the
<code>errno</code> will not be shared between pthreads.
This is, perhaps, non-standard but promotes better thread independence.
<p>
<b>Input Parameters</b>: None
<p>
<b>Returned Values</b>:
<p>
<ul>
<li>A pointer to the thread-specific <I>errno</I> value.
<li>A pointer to the thread-specific <code>errno</code> value.
</ul>
<p>
<H2>3.4 User Interface Structures</H2>
<H2>3.4 <A NAME="UserStructures">User Interface Structures</A></H2>
<p>
<H3>3.4.1 main_t</H3>
<p>
@@ -6597,7 +6662,7 @@ notify a task when a message is available on a queue.
<li><a href="#directoryoperations">Directory operations</a></li>
<li><a href="#driveroperations">Driver operations</a></li>
<li><a href="#exit">exit</a></li>
<li><a href="#FileSystem">Filesystem interfaces</a></li>
<li><a href="#FileSystem">File system interfaces</a></li>
<li><a href="#getpid">getpid</a></li>
<li><a href="#getsockopt">getsockopt</a></li>
<li><a href="#gmtimer">gmtime_r</a></li>

BIN
Documentation/freeports.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

View File

@@ -0,0 +1,20 @@
<html>
<head>
<title>Free NuttX Ports</title>
</head>
<body background="backgd.gif">
<center>
<table border="1" width="80%" bgcolor="#eeeeee">
<tr><td>
<big><b><i>Free</i> Ports</b></big>.
If you have a hardware platform that you would like to see NuttX ported to then have I got a deal for you:
I am willing to port NuttX to run on your hardware <b><i>FREE</i></b>.
You would, of course, have to provide all hardware, development tools, and documentation.
The functionality would be limited to basic boot-up, serial console, networking, ...
I would need to retain the hardware throught the support cycle.
Of course, this offer depends the availability of free time to do the port.
If you are interested, contact <a href="http://sourceforge.net/users/patacongo/">patacongo</a> at SourceForge.
</td></tr></table>
</body>
</html>

160
Makefile
View File

@@ -1,7 +1,7 @@
############################################################
############################################################################
# Makefile
#
# Copyright (C) 2007 Gregory Nutt. All rights reserved.
# Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
#
# Redistribution and use in source and binary forms, with or without
@@ -14,7 +14,7 @@
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# 3. Neither the name Gregory Nutt nor the names of its contributors may be
# 3. Neither the name NuttX nor the names of its contributors may be
# used to endorse or promote products derived from this software
# without specific prior written permission.
#
@@ -31,12 +31,19 @@
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
############################################################
############################################################################
TOPDIR = ${shell pwd}
TOPDIR := ${shell pwd | sed -e 's/ /\\ /g'}
-include ${TOPDIR}/.config
-include ${TOPDIR}/Make.defs
# Default tools
ifeq ($(DIRLINK),)
DIRLINK = $(TOPDIR)/tools/link.sh
DIRUNLINK = $(TOPDIR)/tools/unlink.sh
endif
# Process architecture and board-specific directories
ARCH_DIR = arch/$(CONFIG_ARCH)
@@ -44,11 +51,16 @@ ARCH_SRC = $(ARCH_DIR)/src
ARCH_INC = $(ARCH_DIR)/include
BOARD_DIR = configs/$(CONFIG_ARCH_BOARD)
# Add-on directories. These may or may not be in place in the
# NuttX source tree (they must be specifically installed)
PCODE_DIR := ${shell if [ -r pcode/Makefile ]; then echo "pcode"; fi}
# FSDIRS depend on file descriptor support; NONFSDIRS do not
# (except for parts of FSDIRS). We will exclude FSDIRS
# from the build if file descriptor support is disabled
NONFSDIRS = sched lib $(ARCH_SRC) mm examples/$(CONFIG_EXAMPLE)
NONFSDIRS = sched lib $(ARCH_SRC) mm examples/$(CONFIG_EXAMPLE) $(PCODE_DIR)
FSDIRS = fs drivers
ifeq ($(CONFIG_NET),y)
@@ -60,11 +72,17 @@ endif
# MAKEDIRS are the directories in which we will build targets
CLEANDIRS = $(NONFSDIRS) $(FSDIRS)
MAKEDIRS = $(NONFSDIRS)
ifeq ($(CONFIG_NFILE_DESCRIPTORS),0)
MAKEDIRS = $(NONFSDIRS)
ifneq ($(CONFIG_NSOCKET_DESCRIPTORS),0)
MAKEDIRS += fs
endif
ifeq ($(CONFIG_NET),y)
MAKEDIRS += drivers
endif
else
MAKEDIRS = $(NONFSDIRS) $(FSDIRS)
MAKEDIRS += $(FSDIRS)
endif
# LINKLIBS is the list of NuttX libraries that is passed to the
@@ -75,14 +93,25 @@ endif
LINKLIBS = sched/libsched$(LIBEXT) $(ARCH_SRC)/libarch$(LIBEXT) mm/libmm$(LIBEXT) \
lib/liblib$(LIBEXT) examples/$(CONFIG_EXAMPLE)/lib$(CONFIG_EXAMPLE)$(LIBEXT)
ifneq ($(CONFIG_NFILE_DESCRIPTORS),0)
LINKLIBS += fs/libfs$(LIBEXT) drivers/libdrivers$(LIBEXT)
endif
ifeq ($(CONFIG_NET),y)
LINKLIBS += net/libnet$(LIBEXT) netutils/libnetutils$(LIBEXT)
endif
ifeq ($(CONFIG_NFILE_DESCRIPTORS),0)
ifneq ($(CONFIG_NSOCKET_DESCRIPTORS),0)
LINKLIBS += fs/libfs$(LIBEXT)
endif
ifeq ($(CONFIG_NET),y)
LINKLIBS += drivers/libdrivers$(LIBEXT)
endif
else
LINKLIBS += fs/libfs$(LIBEXT) drivers/libdrivers$(LIBEXT)
endif
ifneq ($(PCODE_DIR),)
LINKLIBS += pcode/libpcode$(LIBEXT)
endif
# This is the name of the final target
BIN = nuttx$(EXEEXT)
@@ -91,7 +120,7 @@ all: $(BIN)
# Build the mkconfig tool used to create include/nuttx/config.h
tools/mkconfig:
$(MAKE) -C tools -f Makefile.mkconfig TOPDIR=$(TOPDIR) mkconfig
@$(MAKE) -C tools -f Makefile.mkconfig TOPDIR="$(TOPDIR)" mkconfig
# Create the include/nuttx/config.h file
include/nuttx/config.h: $(TOPDIR)/.config tools/mkconfig
@@ -99,79 +128,39 @@ include/nuttx/config.h: $(TOPDIR)/.config tools/mkconfig
# link the arch/<arch-name>/include dir to include/arch
include/arch: Make.defs
@if [ -h include/arch ]; then \
rm -f include/arch ; \
else \
if [ -e include/arch ]; then \
echo "include/arch exists but is not a symbolic link" ; \
exit 1 ; \
fi ; \
fi
@ln -s $(TOPDIR)/$(ARCH_DIR)/include include/arch
@$(DIRLINK) $(TOPDIR)/$(ARCH_DIR)/include include/arch
# Link the configs/<board-name>/include dir to include/arch/board
include/arch/board: Make.defs include/arch
@if [ -h include/arch/board ]; then \
rm -f include/arch/board ; \
else \
if [ -e include/arch/board ]; then \
echo "include/arch/board exists but is not a symbolic link" ; \
exit 1 ; \
fi ; \
fi
@ln -s $(TOPDIR)/$(BOARD_DIR)/include include/arch/board
include/arch/board: include/arch Make.defs include/arch
@$(DIRLINK) $(TOPDIR)/$(BOARD_DIR)/include include/arch/board
# Link the configs/<board-name>/src dir to arch/<arch-name>/src/board
$(ARCH_SRC)/board: Make.defs
@if [ -h $(ARCH_SRC)/board ]; then \
rm -f $(ARCH_SRC)/board ; \
else \
if [ -e $(ARCH_SRC)/board ]; then \
echo "$(ARCH_SRC)/board exists but is not a symbolic link" ; \
exit 1 ; \
fi ; \
fi
@ln -s $(TOPDIR)/$(BOARD_DIR)/src $(ARCH_SRC)/board
@$(DIRLINK) $(TOPDIR)/$(BOARD_DIR)/src $(ARCH_SRC)/board
# Link arch/<arch-name>/include/<chip-name> to arch/<arch-name>/include/chip
$(ARCH_SRC)/chip: Make.defs
ifneq ($(CONFIG_ARCH_CHIP),)
@if [ -h $(ARCH_SRC)/chip ]; then \
rm -f $(ARCH_SRC)/chip ; \
else \
if [ -e $(ARCH_SRC)/chip ]; then \
echo "$(ARCH_SRC)/chip exists but is not a symbolic link" ; \
exit 1 ; \
fi ; \
fi
@ln -s $(CONFIG_ARCH_CHIP) $(ARCH_SRC)/chip
@$(DIRLINK) $(TOPDIR)/$(ARCH_SRC)/$(CONFIG_ARCH_CHIP) $(ARCH_SRC)/chip
endif
# Link arch/<arch-name>/src/<chip-name> to arch/<arch-name>/src/chip
$(ARCH_INC)/chip: Make.defs
include/arch/chip: include/arch Make.defs
ifneq ($(CONFIG_ARCH_CHIP),)
@if [ -e $(ARCH_INC)/chip ]; then \
if [ -h $(ARCH_INC)/chip ]; then \
rm -f $(ARCH_INC)/chip ; \
else \
echo "$(ARCH_INC)/chip exists but is not a symbolic link" ; \
exit 1 ; \
fi ; \
fi
@ln -s $(CONFIG_ARCH_CHIP) $(ARCH_INC)/chip
@$(DIRLINK) $(TOPDIR)/$(ARCH_INC)/$(CONFIG_ARCH_CHIP) include/arch/chip
endif
dirlinks: include/arch include/arch/board $(ARCH_SRC)/board $(ARCH_SRC)/chip $(ARCH_INC)/chip
dirlinks: include/arch include/arch/board include/arch/chip $(ARCH_SRC)/board $(ARCH_SRC)/chip
context: check_context include/nuttx/config.h dirlinks
clean_context:
@rm -f include/nuttx/config.h include/arch
@if [ -h include/arch ]; then rm -f include/arch ; fi
@if [ -h $(ARCH_INC)/board ]; then rm -f $(ARCH_INC)/board ; fi
@if [ -h $(ARCH_SRC)/board ]; then rm -f $(ARCH_SRC)/board ; fi
@if [ -h $(ARCH_INC)/chip ]; then rm -f $(ARCH_INC)/chip ; fi
@if [ -h $(ARCH_SRC)/chip ]; then rm -f $(ARCH_SRC)/chip ; fi
@rm -f include/nuttx/config.h
@$(DIRUNLINK) include/arch/board
@$(DIRUNLINK) include/arch/chip
@$(DIRUNLINK) include/arch
@$(DIRUNLINK) $(ARCH_SRC)/board
@$(DIRUNLINK) $(ARCH_SRC)/chip
check_context:
@if [ ! -e ${TOPDIR}/.config -o ! -e ${TOPDIR}/Make.defs ]; then \
@@ -181,60 +170,63 @@ check_context:
fi
sched/libsched$(LIBEXT): context
$(MAKE) -C sched TOPDIR=$(TOPDIR) libsched$(LIBEXT)
@$(MAKE) -C sched TOPDIR="$(TOPDIR)" libsched$(LIBEXT)
lib/liblib$(LIBEXT): context
$(MAKE) -C lib TOPDIR=$(TOPDIR) liblib$(LIBEXT)
@$(MAKE) -C lib TOPDIR="$(TOPDIR)" liblib$(LIBEXT)
$(ARCH_SRC)/libarch$(LIBEXT): context
$(MAKE) -C $(ARCH_SRC) TOPDIR=$(TOPDIR) libarch$(LIBEXT)
@$(MAKE) -C $(ARCH_SRC) TOPDIR="$(TOPDIR)" libarch$(LIBEXT)
mm/libmm$(LIBEXT): context
$(MAKE) -C mm TOPDIR=$(TOPDIR) libmm$(LIBEXT)
@$(MAKE) -C mm TOPDIR="$(TOPDIR)" libmm$(LIBEXT)
net/libnet$(LIBEXT): context
$(MAKE) -C net TOPDIR=$(TOPDIR) libnet$(LIBEXT)
@$(MAKE) -C net TOPDIR="$(TOPDIR)" libnet$(LIBEXT)
netutils/libnetutils$(LIBEXT): context
$(MAKE) -C netutils TOPDIR=$(TOPDIR) libnetutils$(LIBEXT)
@$(MAKE) -C netutils TOPDIR="$(TOPDIR)" libnetutils$(LIBEXT)
fs/libfs$(LIBEXT): context
$(MAKE) -C fs TOPDIR=$(TOPDIR) libfs$(LIBEXT)
@$(MAKE) -C fs TOPDIR="$(TOPDIR)" libfs$(LIBEXT)
drivers/libdrivers$(LIBEXT): context
$(MAKE) -C drivers TOPDIR=$(TOPDIR) libdrivers$(LIBEXT)
@$(MAKE) -C drivers TOPDIR="$(TOPDIR)" libdrivers$(LIBEXT)
pcode/libpcode$(LIBEXT): context
@$(MAKE) -C pcode TOPDIR="$(TOPDIR)" libpcode$(LIBEXT)
examples/$(CONFIG_EXAMPLE)/lib$(CONFIG_EXAMPLE)$(LIBEXT): context
$(MAKE) -C examples/$(CONFIG_EXAMPLE) TOPDIR=$(TOPDIR) lib$(CONFIG_EXAMPLE)$(LIBEXT)
@$(MAKE) -C examples/$(CONFIG_EXAMPLE) TOPDIR="$(TOPDIR)" lib$(CONFIG_EXAMPLE)$(LIBEXT)
$(BIN): context depend $(LINKLIBS)
$(MAKE) -C $(ARCH_SRC) TOPDIR=$(TOPDIR) LINKLIBS="$(LINKLIBS)" $(BIN)
@$(MAKE) -C $(ARCH_SRC) TOPDIR="$(TOPDIR)" LINKLIBS="$(LINKLIBS)" $(BIN)
depend:
@for dir in $(MAKEDIRS) ; do \
$(MAKE) -C $$dir TOPDIR=$(TOPDIR) depend ; \
$(MAKE) -C $$dir TOPDIR="$(TOPDIR)" depend ; \
done
subdir_clean:
@for dir in $(CLEANDIRS) ; do \
if [ -e $$dir/Makefile ]; then \
$(MAKE) -C $$dir TOPDIR=$(TOPDIR) clean ; \
$(MAKE) -C $$dir TOPDIR="$(TOPDIR)" clean ; \
fi \
done
$(MAKE) -C tools -f Makefile.mkconfig TOPDIR=$(TOPDIR) clean
$(MAKE) -C mm -f Makefile.test TOPDIR=$(TOPDIR) clean
@$(MAKE) -C tools -f Makefile.mkconfig TOPDIR="$(TOPDIR)" clean
@$(MAKE) -C mm -f Makefile.test TOPDIR="$(TOPDIR)" clean
clean: subdir_clean
rm -f $(BIN) $(BIN).* mm_test *.map *~
@rm -f $(BIN) $(BIN).* mm_test *.map *~
subdir_distclean:
@for dir in $(CLEANDIRS) ; do \
if [ -e $$dir/Makefile ]; then \
$(MAKE) -C $$dir TOPDIR=$(TOPDIR) distclean ; \
$(MAKE) -C $$dir TOPDIR="$(TOPDIR)" distclean ; \
fi \
done
distclean: clean subdir_distclean clean_context
rm -f Make.defs setenv.sh .config
@rm -f Make.defs setenv.sh .config

View File

@@ -1,23 +1,9 @@
nuttx-0.3.1
nuttx-0.3.8
^^^^^^^^^^^
This is the 13th release of NuttX and the second release containing
the integration of a network subsystem and the uIP TCP/IP, UDP, and
ICMP stacks into NuttX (see http://www.sics.se/~adam/uip/index.php/Main_Page).
This is the 20th release of NuttX. This is a minor bugfix release.
It corrects a few minor problems, adds a few minor features, and
continues the integration of the ZiLOG Z18F and of the Pascal P-Code
add-on. This release is synchronized with the release of Pascal-0.1.2.
Many network-related problems have been fixed and the implementation
has matured significantly. However, the level of network reliability
is probably still at the pre-alpha or early level. It is sufficiently
complete that you may begin to perform some network integration and
is exepcted to achieve beta level of reliability over the next few
releases.
The baseline functionality of NuttX continues to mature and remains at
post-beta (as long as the network is not used).
See the ChangeLog for a complete list of changes.
This release has been verified only on the Neuros OSD (DM320 ARM9)
platform using the DM90x0 driver.
This tarball contains a complete CVS snapshot from November 19, 2007.
This tarball contains a complete CVS snapshot from February 10, 2008.

501
TODO

File diff suppressed because it is too large Load Diff

View File

@@ -125,7 +125,7 @@ Supported Architectures
arch/sim
A user-mode port of NuttX to the x86 Linux platform is available.
The purpose of this port is primarily to support OS feature developement.
The purpose of this port is primarily to support OS feature development.
This port does not support interrupts or a real timer (and hence no
round robin scheduler) Otherwise, it is complete.
@@ -159,9 +159,19 @@ arch/m68322
arch/pjrc-8051
8051 Microcontroller. This port is not quite ready for prime time.
arch/z16
ZiLOG z16f Microcontroller.
STATUS: Released in nuttx-0.3.7. Fully functional other than issues
addressed in ${TOPDIR}/TODO.
arch/z80
ZiLOG z80 Microcontroller.
STATUS: Functional with no known defects. There are still several
OS features that have not yet been tested (e.g., networking).
The following architecture directories are deprecated. They have been
replaced by the logic in arm/arm and will deleted when arch/arm is fully
verified.
replaced by the logic in arm/arm and will deleted at some point in the
future.
arch/c5471
Replaced with arch/arm/include/c5471 and arch/arm/src/c5471

View File

@@ -134,7 +134,9 @@ struct xcptcontext
* are pending signals to be processed.
*/
#ifndef CONFIG_DISABLE_SIGNALS
void *sigdeliver; /* Actual type is sig_deliver_t */
#endif
/* These are saved copies of LR and CPSR used during
* signal processing.

View File

@@ -1,7 +1,7 @@
############################################################################
# Makefile
# arch/arm/src/Makefile
#
# Copyright (C) 2007 Gregory Nutt. All rights reserved.
# Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
#
# Redistribution and use in source and binary forms, with or without
@@ -14,7 +14,7 @@
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# 3. Neither the name Gregory Nutt nor the names of its contributors may be
# 3. Neither the name NuttX nor the names of its contributors may be
# used to endorse or promote products derived from this software
# without specific prior written permission.
#
@@ -36,7 +36,6 @@
-include $(TOPDIR)/Make.defs
-include chip/Make.defs
MKDEP = $(TOPDIR)/tools/mkdeps.sh
ARCH_SRCDIR = $(TOPDIR)/arch/$(CONFIG_ARCH)/src
CFLAGS += -I$(ARCH_SRCDIR)/chip -I$(ARCH_SRCDIR)/common -I$(TOPDIR)/sched
@@ -67,22 +66,22 @@ VPATH = chip:common
all: $(HEAD_OBJ) libarch$(LIBEXT)
$(AOBJS) $(HEAD_AOBJ): %$(OBJEXT): %.S
$(CC) -c $(CFLAGS) -D__ASSEMBLY__ $< -o $@
$(call ASSEMBLE, $<, $@)
$(COBJS): %$(OBJEXT): %.c
$(CC) -c $(CFLAGS) $< -o $@
$(call COMPILE, $<, $@)
libarch$(LIBEXT): $(OBJS)
@( for obj in $(OBJS) ; do \
$(AR) $@ $${obj} || \
{ echo "$(AR) $@ $obj FAILED!" ; exit 1 ; } ; \
$(call ARCHIVE, $@, $${obj}); \
done ; )
board/libboard$(LIBEXT):
$(MAKE) -C board TOPDIR=$(TOPDIR) libboard$(LIBEXT)
$(MAKE) -C board TOPDIR="$(TOPDIR)" libboard$(LIBEXT)
nuttx: $(HEAD_AOBJ) board/libboard$(LIBEXT)
$(LD) --entry=__start $(LDFLAGS) $(LDPATHES) -L$(BOARDDIR) -o $(TOPDIR)/$@ $(HEAD_AOBJ) \
@echo "LD: nuttx"
@$(LD) --entry=__start $(LDFLAGS) $(LDPATHES) -L$(BOARDDIR) -o $(TOPDIR)/$@ $(HEAD_AOBJ) \
--start-group $(LDLIBS) -lboard --end-group $(EXTRA_LIBS) $(LIBGCC)
@$(NM) $(TOPDIR)/$@ | \
grep -v '\(compiled\)\|\(\$(OBJEXT)$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \
@@ -101,23 +100,23 @@ endif
.depend: Makefile chip/Make.defs $(SRCS)
@if [ -e board/Makefile ]; then \
$(MAKE) -C board TOPDIR=$(TOPDIR) depend ; \
$(MAKE) -C board TOPDIR="$(TOPDIR)" depend ; \
fi
$(MKDEP) --dep-path chip --dep-path common $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
@$(MKDEP) --dep-path chip --dep-path common $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
@touch $@
depend: .depend
clean:
@if [ -e board/Makefile ]; then \
$(MAKE) -C board TOPDIR=$(TOPDIR) clean ; \
$(MAKE) -C board TOPDIR="$(TOPDIR)" clean ; \
fi
@rm -f libarch$(LIBEXT) *~
@if [ ! -z "$(OBJEXT)" ]; then rm -f *$(OBJEXT); fi
@rm -f libarch$(LIBEXT) *~ .*.swp
$(call CLEAN)
distclean: clean
@if [ -e board/Makefile ]; then \
$(MAKE) -C board TOPDIR=$(TOPDIR) distclean ; \
$(MAKE) -C board TOPDIR="$(TOPDIR)" distclean ; \
fi
@rm -f Make.dep .depend

View File

@@ -37,7 +37,7 @@ HEAD_ASRC = up_nommuhead.S
CMN_ASRCS = up_saveusercontext.S up_fullcontextrestore.S
CMN_CSRCS = up_allocateheap.c up_assert.c up_blocktask.c up_copystate.c \
up_createstack.c up_dataabort.c up_mdelay.c up_udealy.c up_doirq.c \
up_createstack.c up_dataabort.c up_mdelay.c up_udelay.c up_doirq.c \
up_exit.c up_idle.c up_initialize.c up_initialstate.c \
up_interruptcontext.c up_prefetchabort.c up_releasepending.c \
up_releasestack.c up_reprioritizertr.c up_schedulesigaction.c \
@@ -45,4 +45,5 @@ CMN_CSRCS = up_allocateheap.c up_assert.c up_blocktask.c up_copystate.c \
up_undefinedinsn.c up_usestack.c
CHIP_ASRCS = c5471_lowputc.S c5471_vectors.S
CHIP_CSRCS = c5471_irq.c c5471_serial.c c5471_timerisr.c c5471_watchdog.c
CHIP_CSRCS = c5471_irq.c c5471_serial.c c5471_timerisr.c c5471_watchdog.c \
c5471_ethernet.c

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +1,4 @@
/************************************************************
/****************************************************************************
* c5471/chip.h
*
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
@@ -31,20 +31,61 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
************************************************************/
****************************************************************************/
#ifndef __C5471_CHIP_H
#define __C5471_CHIP_H
/************************************************************
/****************************************************************************
* Included Files
************************************************************/
****************************************************************************/
/************************************************************
/****************************************************************************
* Definitions
************************************************************/
****************************************************************************/
/* UARTs ****************************************************/
#define EIM_RAM_START 0xffd00000
/* Ethernet Interface Module (EIM) ******************************************/
#define EIM_CTRL 0xffff0000 /* ESM control register */
#define EIM_STATUS 0xffff0004 /* ESM status register */
#define EIM_CPU_TXBA 0xffff0008 /* CPU TX descriptors base address */
#define EIM_CPU_RXBA 0xffff000c /* CPU RX descriptors base address */
#define EIM_BUFSIZE 0xffff0010 /* Packet buffer size register */
#define EIM_CPU_FILTER 0xffff0014 /* CPU filtering contol registers */
#define EIM_CPU_DAHI 0xffff0018 /* CPU destination address (HI) */
#define EIM_CPU_DALO 0xffff001c /* CPU destination address (LO) */
#define EIM_MFVHI 0xffff0020 /* Multicast filter valid (HI) */
#define EIM_MFVLO 0xffff0024 /* Multicast filter valid (LO) */
#define EIM_MFMHI 0xffff0028 /* Multicast filter mask (HI) */
#define EIM_MFMLO 0xffff002c /* Multicast filter mask (LO) */
#define EIM_RXTH 0xffff0030 /* RX threshold register */
#define EIM_CPU_RXREADY 0xffff0034 /* CPU RX ready register */
#define EIM_INTEN 0xffff0038 /* ESM interrupt enable register */
#define EIM_ENET0_TXDESC 0xffff0040 /* ENET0 TX Queue pointer */
#define EIM_ENET0_RXDESC 0xffff0044 /* ENET0 RX Queue pointer */
#define EIM_CPU_TXDESC 0xffff0050 /* CPU TX Queue pointer */
#define EIM_CPU_RXDESC 0xffff0054 /* CPU RX Queue pointer */
#define ENET0_MODE 0xffff0100 /* Mode register */
#define ENET0_BOFFSEED 0xffff0104 /* Backoff seed register */
#define ENET0_BCOUNT 0xffff0108 /* Backoff count register */
#define ENET0_FLWPAUSE 0xffff010c /* TX flow pause count register */
#define ENET0_FLWCONTROL 0xffff0110 /* Flow control register */
#define ENET0_VTYPE 0xffff0114 /* VTYPE tag register */
#define ENET0_SEISR 0xffff0118 /* System error int status register */
#define ENET0_TXBUFRDY 0xffff011c /* TX descripter buffer ready */
#define ENET0_TDBA 0xffff0120 /* TX descriptor base address */
#define ENET0_RDBA 0xffff0124 /* RX descriptor base address */
#define ENET0_PARHI 0xffff0128 /* Dest phys address match (HI) */
#define ENET0_PARLO 0xffff012c /* Dest phys address match (LO) */
#define ENET0_LARHI 0xffff0130 /* Log address hash filter (HI) */
#define ENET0_LARLO 0xffff0134 /* Log address hash filter (LO) */
#define ENET0_ADRMODE_EN 0xffff0138 /* Address mode enable register */
#define ENET0_DRP 0xffff013c /* Desc ring poll interval count */
/* UARTs ********************************************************************/
#define UART_IRDA_BASE 0xffff0800
#define UART_MODEM_BASE 0xffff1000
@@ -110,7 +151,7 @@
#define UART_MODEM_RDPTR_UTX 0xffff1064 /* TX FIFO Read Pointer Register */
#define UART_MODEM_WRPTR_UTX 0xffff1068 /* TX FIFO Write Pointer Register */
/* UART Settings ********************************************/
/* UART Settings ************************************************************/
/* Miscellaneous UART settings. */
@@ -164,13 +205,13 @@
#define MDR_AUTOBAUDING_MODE 0x00000002 /* Modem UART only */
#define MDR_RESET_MODE 0x00000007 /* Both IrDA and Modem UARTs */
/* SPI ******************************************************/
/* SPI **********************************************************************/
#define MAX_SPI 3
#define SPI_REGISTER_BASE 0xffff2000
/* GIO ******************************************************/
/* GIO **********************************************************************/
#define MAX_GIO (35)
@@ -211,7 +252,7 @@
#define KBGPIO_EN 0xffff2914 /* Selects register for muxed
* KBGPIOs */
/* Timers ***************************************************/
/* Timers *******************************************************************/
#define C5471_TIMER0_CTRL 0xffff2a00
#define C5471_TIMER0_CNT 0xffff2a04
@@ -241,8 +282,8 @@
#define ILR_IRQ3_REG 0xffff2d28 /* 3-GPIO0 */
#define ILR_IRQ4_REG 0xffff2d2c /* 4-Ethernet */
#define ILR_IRQ5_REG 0xffff2d30 /* 5-KBGPIO[7:0] */
#define ILR_IRQ6_REG 0xffff2d34 /* 6-Uart serial */
#define ILR_IRQ7_REG 0xffff2d38 /* 7-Uart IRDA */
#define ILR_IRQ6_REG 0xffff2d34 /* 6-Uart serial */
#define ILR_IRQ7_REG 0xffff2d38 /* 7-Uart IRDA */
#define ILR_IRQ8_REG 0xffff2d3c /* 8-KBGPIO[15:8] */
#define ILR_IRQ9_REG 0xffff2d40 /* 9-GPIO3 */
#define ILR_IRQ10_REG 0xffff2d44 /* 10-GPIO2 */
@@ -252,11 +293,22 @@
#define ILR_IRQ14_REG 0xffff2d54 /* 14-GPIO[19:4] */
#define ILR_IRQ15_REG 0xffff2d58 /* 15-API */
/* I2C ******************************************************/
/* CLKM *********************************************************************/
#define CLKM 0xffff2f00
#define CLKM_CTL_RST 0xffff2f10
#define CLKM_RESET 0xffff2f18
#define CLKM_RESET_EIM 0x00000008
#define CLKM_EIM_CLK_STOP 0x00000010
#define CLKM_CTL_RST_LEAD_RESET 0x00000000
#define CLKM_CTL_RST_EXT_RESET 0x00000002
/* I2C **********************************************************************/
#define MAX_I2C 1
/* API ******************************************************/
/* API **********************************************************************/
#define DSPRAM_BASE 0xffe00000 /* DSPRAM base address */
#define DSPRAM_END 0xffe03fff
@@ -308,12 +360,12 @@
#define DSPMEM_ARM_TO_DSP(addr) \
((((__u32)(addr) - DSPMEM_ARM_START) >> 1) + DSPMEM_DSP_START)
/************************************************************
/****************************************************************************
* Inline Functions
************************************************************/
****************************************************************************/
/************************************************************
/****************************************************************************
* Public Function Prototypes
************************************************************/
****************************************************************************/
#endif /* __C5471_CHIP_H */

View File

@@ -84,7 +84,7 @@ static inline void putreg16(uint16 val, unsigned int addr)
/* Most DM320 registers are 16-bits wide */
#define getreg(a) getreg16(1)
#define getreg(a) getreg16(a)
#define putreg(v,a) putreg16(v,a)
#endif

View File

@@ -1,7 +1,7 @@
/************************************************************
/****************************************************************************
* common/up_assert.c
*
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -14,7 +14,7 @@
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name Gregory Nutt nor the names of its contributors may be
* 3. Neither the name NuttX nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
@@ -31,11 +31,11 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
************************************************************/
****************************************************************************/
/************************************************************
/****************************************************************************
* Included Files
************************************************************/
****************************************************************************/
#include <nuttx/config.h>
@@ -51,9 +51,9 @@
#include "os_internal.h"
#include "up_internal.h"
/************************************************************
/****************************************************************************
* Definitions
************************************************************/
****************************************************************************/
/* Output debug info if stack dump is selected -- even if
* debug is not selected.
@@ -64,17 +64,17 @@
# define lldbg lib_lowprintf
#endif
/************************************************************
/****************************************************************************
* Private Data
************************************************************/
****************************************************************************/
/************************************************************
/****************************************************************************
* Private Functions
************************************************************/
****************************************************************************/
/************************************************************
/****************************************************************************
* Name: up_getsp
************************************************************/
****************************************************************************/
/* I don't know if the builtin to get SP is enabled */
@@ -89,9 +89,9 @@ static inline uint32 up_getsp(void)
return sp;
}
/************************************************************
/****************************************************************************
* Name: up_stackdump
************************************************************/
****************************************************************************/
#ifdef CONFIG_ARCH_STACKDUMP
static void up_stackdump(void)
@@ -152,9 +152,9 @@ static void up_stackdump(void)
# define up_stackdump()
#endif
/************************************************************
/****************************************************************************
* Name: _up_assert
************************************************************/
****************************************************************************/
static void _up_assert(int errorcode) /* __attribute__ ((noreturn)) */
{
@@ -179,13 +179,13 @@ static void _up_assert(int errorcode) /* __attribute__ ((noreturn)) */
}
}
/************************************************************
* Public Funtions
************************************************************/
/****************************************************************************
* Public Functions
****************************************************************************/
/************************************************************
/****************************************************************************
* Name: up_assert
************************************************************/
****************************************************************************/
void up_assert(const ubyte *filename, int lineno)
{
@@ -205,9 +205,9 @@ void up_assert(const ubyte *filename, int lineno)
_up_assert(EXIT_FAILURE);
}
/************************************************************
/****************************************************************************
* Name: up_assert_code
************************************************************/
****************************************************************************/
void up_assert_code(const ubyte *filename, int lineno, int errorcode)
{

View File

@@ -1,7 +1,7 @@
/************************************************************
/****************************************************************************
* common/up_exit.c
*
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -14,7 +14,7 @@
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name Gregory Nutt nor the names of its contributors may be
* 3. Neither the name NuttX nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
@@ -31,11 +31,11 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
************************************************************/
****************************************************************************/
/************************************************************
/****************************************************************************
* Included Files
************************************************************/
****************************************************************************/
#include <nuttx/config.h>
#include <sys/types.h>
@@ -49,34 +49,38 @@
#include <nuttx/fs.h>
#endif
/************************************************************
/****************************************************************************
* Private Definitions
************************************************************/
****************************************************************************/
/************************************************************
/****************************************************************************
* Private Data
************************************************************/
****************************************************************************/
/************************************************************
* Private Funtions
************************************************************/
/****************************************************************************
* Private Functions
****************************************************************************/
/************************************************************
/****************************************************************************
* Name: _up_dumponexit
*
* Description:
* Dump the state of all tasks whenever on task exits. This
* is debug instrumentation that was added to check file-
* related reference counting but could be useful again
* sometime in the future.
* Dump the state of all tasks whenever on task exits. This is debug
* instrumentation that was added to check file-related reference counting
* but could be useful again sometime in the future.
*
************************************************************/
****************************************************************************/
#if defined(CONFIG_DUMP_ON_EXIT) && defined(CONFIG_DEBUG)
static void _up_dumponexit(FAR _TCB *tcb, FAR void *arg)
{
#if CONFIG_NFILE_DESCRIPTORS > 0 || CONFIG_NFILE_STREAMS > 0
int i;
#endif
dbg(" TCB=%p name=%s\n", tcb, tcb->argv[0]);
#if CONFIG_NFILE_DESCRIPTORS > 0
if (tcb->filelist)
{
dbg(" filelist refcount=%d\n",
@@ -92,7 +96,9 @@ static void _up_dumponexit(FAR _TCB *tcb, FAR void *arg)
}
}
}
#endif
#if CONFIG_NFILE_STREAMS > 0
if (tcb->streams)
{
dbg(" streamlist refcount=%d\n",
@@ -103,31 +109,38 @@ static void _up_dumponexit(FAR _TCB *tcb, FAR void *arg)
struct file_struct *filep = &tcb->streams->sl_streams[i];
if (filep->fs_filedes >= 0)
{
#if CONFIG_STDIO_BUFFER_SIZE > 0
dbg(" fd=%d nbytes=%d\n",
filep->fs_filedes,
filep->fs_bufpos - filep->fs_bufstart);
#else
dbg(" fd=%d\n", filep->fs_filedes);
#endif
}
}
}
#endif
}
#endif
/************************************************************
* Public Funtions
************************************************************/
/****************************************************************************
* Public Functions
****************************************************************************/
/************************************************************
/****************************************************************************
* Name: _exit
*
* Description:
* This function causes the currently executing task to cease
* to exist. This is a special case of task_delete().
* to exist. This is a special case of task_delete() where the task to
* be deleted is the currently executing task. It is more complex because
* a context switch must be perform to the the next ready to run task.
*
************************************************************/
****************************************************************************/
void _exit(int status)
{
_TCB* tcb = (_TCB*)g_readytorun.head;
_TCB* tcb;
/* Disable interrupts. They will be restored when the next
* task is started.
@@ -138,41 +151,13 @@ void _exit(int status)
lldbg("TCB=%p exitting\n", tcb);
#if defined(CONFIG_DUMP_ON_EXIT) && defined(CONFIG_DEBUG)
dbg("Other tasks:\n");
lldbg("Other tasks:\n");
sched_foreach(_up_dumponexit, NULL);
#endif
/* Remove the tcb task from the ready-to-run list. We can
* ignore the return value because we know that a context
* switch is needed.
*/
/* Destroy the task at the head of the ready to run list. */
(void)sched_removereadytorun(tcb);
/* We are not in a bad stack-- the head of the ready to run task list
* does not correspond to the thread that is running. Disabling pre-
* emption on this TCB should be enough to keep things stable.
*/
sched_lock();
/* Move the TCB to the specified blocked task list and delete it */
sched_addblocked(tcb, TSTATE_TASK_INACTIVE);
task_delete(tcb->pid);
/* If there are any pending tasks, then add them to the g_readytorun
* task list now
*/
if (g_pendingtasks.head)
{
(void)sched_mergepending();
}
/* Now calling sched_unlock() should have no effect */
sched_unlock();
(void)task_deletecurrent();
/* Now, perform the context switch to the new ready-to-run task at the
* head of the list.

View File

@@ -284,7 +284,7 @@ __start:
#endif
/* Perform early serial initialization */
#ifdef CONFIG_DEV_CONSOLE
#if defined(CONFIG_DEV_CONSOLE) && CONFIG_NFILE_DESCRIPTORS > 0
bl up_earlyserialinit
#endif

View File

@@ -129,7 +129,9 @@ void up_initialize(void)
/* Register devices */
#if CONFIG_NFILE_DESCRIPTORS > 0
devnull_register(); /* Standard /dev/null */
#endif
/* Initialize the serial device driver */

View File

@@ -1,7 +1,7 @@
/************************************************************
/****************************************************************************
* common/up_internal.h
*
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -14,7 +14,7 @@
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name Gregory Nutt nor the names of its contributors may be
* 3. Neither the name NuttX nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
@@ -31,41 +31,41 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
************************************************************/
****************************************************************************/
#ifndef __UP_INTERNAL_H
#define __UP_INTERNAL_H
/************************************************************
/****************************************************************************
* Included Files
************************************************************/
****************************************************************************/
/************************************************************
/****************************************************************************
* Definitions
************************************************************/
****************************************************************************/
/* Bring-up debug configurations. These are here (vs defconfig)
* because these should only be controlled during low level
* board bring-up and not part of normal platform configuration.
*/
#undef CONFIG_SUPPRESS_INTERRUPTS /* Do not enable interrupts */
#undef CONFIG_SUPPRESS_TIMER_INTS /* No timer */
#undef CONFIG_SUPPRESS_SERIAL_INTS /* Console will poll */
#undef CONFIG_SUPPRESS_UART_CONFIG /* Do not reconfig UART */
#define CONFIG_DUMP_ON_EXIT 1 /* Dump task state on exit */
#undef CONFIG_SUPPRESS_INTERRUPTS /* DEFINED: Do not enable interrupts */
#undef CONFIG_SUPPRESS_TIMER_INTS /* DEFINED: No timer */
#undef CONFIG_SUPPRESS_SERIAL_INTS /* DEFINED: Console will poll */
#undef CONFIG_SUPPRESS_UART_CONFIG /* DEFINED: Do not reconfig UART */
#undef CONFIG_DUMP_ON_EXIT /* DEFINED: Dump task state on exit */
/************************************************************
/****************************************************************************
* Public Types
************************************************************/
****************************************************************************/
#ifndef __ASSEMBLY__
typedef void (*up_vector_t)(void);
#endif
/************************************************************
/****************************************************************************
* Public Variables
************************************************************/
****************************************************************************/
#ifndef __ASSEMBLY__
/* This holds a references to the current interrupt level
@@ -84,14 +84,14 @@ extern uint32 *current_regs;
extern uint32 g_heapbase;
#endif
/************************************************************
/****************************************************************************
* Inline Functions
************************************************************/
****************************************************************************/
/************************************************************
/****************************************************************************
* Public Functions
************************************************************/
****************************************************************************/
#ifndef __ASSEMBLY__
@@ -129,8 +129,13 @@ extern void up_vectorfiq(void);
/* Defined in up_serial.c */
#if CONFIG_NFILE_DESCRIPTORS > 0
extern void up_earlyserialinit(void);
extern void up_serialinit(void);
#else
# define up_earlyserialinit()
# define up_serialinit()
#endif
/* Defined in up_watchdog.c */

View File

@@ -104,10 +104,13 @@ __start:
blt 1b
#endif
#if defined(CONFIG_DEV_CONSOLE) && CONFIG_NFILE_DESCRIPTORS >0
/* Perform early serial initialization */
mov fp, #0
bl up_earlyserialinit
#endif
#ifdef CONFIG_DEBUG
mov r0, #'C'

View File

@@ -1,7 +1,7 @@
/************************************************************
/****************************************************************************
* common/up_sigdeliver.c
*
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -14,7 +14,7 @@
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name Gregory Nutt nor the names of its contributors may be
* 3. Neither the name NuttX nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
@@ -31,11 +31,11 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
************************************************************/
****************************************************************************/
/************************************************************
/****************************************************************************
* Included Files
************************************************************/
****************************************************************************/
#include <nuttx/config.h>
#include <sys/types.h>
@@ -47,23 +47,23 @@
#include "up_internal.h"
#include "up_arch.h"
/************************************************************
/****************************************************************************
* Definitions
************************************************************/
****************************************************************************/
/************************************************************
/****************************************************************************
* Private Data
************************************************************/
****************************************************************************/
/************************************************************
/****************************************************************************
* Private Functions
************************************************************/
****************************************************************************/
/************************************************************
/****************************************************************************
* Public Funtions
************************************************************/
****************************************************************************/
/************************************************************
/****************************************************************************
* Name: up_sigdeliver
*
* Description:
@@ -72,7 +72,7 @@
* with and forced to branch to this location with interrupts
* disabled.
*
************************************************************/
****************************************************************************/
void up_sigdeliver(void)
{
@@ -86,7 +86,7 @@ void up_sigdeliver(void)
* the correct errno value (probably EINTR).
*/
int saved_errno = rtcb->errno;
int saved_errno = rtcb->pterrno;
up_ledon(LED_SIGNAL);
@@ -125,7 +125,7 @@ void up_sigdeliver(void)
*/
dbg("Resuming\n");
rtcb->errno = saved_errno;
rtcb->pterrno = saved_errno;
/* Then restore the correct state for this thread of
* execution.

View File

@@ -84,10 +84,10 @@
up_lowputc:
/* On entry, r0 holds the character to be printed */
#ifdef CONFIG_UART0_SERIAL_CONSOLE
ldr r2, =DM320_UART0_REGISTER_BASE /* r2=UART0 base */
#else
#ifdef CONFIG_UART1_SERIAL_CONSOLE
ldr r2, =DM320_UART1_REGISTER_BASE /* r2=UART1 base */
#else
ldr r2, =DM320_UART0_REGISTER_BASE /* r2=UART0 base */
#endif
/* Poll the TX fifo trigger level bit of the UART_SSR

File diff suppressed because it is too large Load Diff

View File

@@ -70,24 +70,28 @@
#define UART_DTRR_DTR_MASK 0x00ff /* Data transmit/receive */
/* UART BRSR register bit definitions */
/* The UART clock is half of the ARM clock */
/* The UART module is clocked by either the AHB clock or PLLIN / 16 */
#define UART_CLK (DM320_ARM_CLOCK / 2)
#ifdef CONFIG_DM320_UARTPPLIN
# define UART_REFCLK (27000000 / 16)
#else
# define UART_REFCLK (DM320_AHB_CLOCK / 16)
#endif
/* And baud rate = UART_CLK / 16 / (VALUE+1) */
/* And baud = UART_REFCLK / (brsr+1) */
#define UART_BAUD_2400 ((uint16)(((UART_CLK / 16) / 2400 ) - 1))
#define UART_BAUD_4800 ((uint16)(((UART_CLK / 16) / 4800 ) - 1))
#define UART_BAUD_9600 ((uint16)(((UART_CLK / 16) / 9600 ) - 1))
#define UART_BAUD_14400 ((uint16)(((UART_CLK / 16) / 14400 ) - 1))
#define UART_BAUD_19200 ((uint16)(((UART_CLK / 16) / 19200 ) - 1))
#define UART_BAUD_28800 ((uint16)(((UART_CLK / 16) / 28800 ) - 1))
#define UART_BAUD_38400 ((uint16)(((UART_CLK / 16) / 38400 ) - 1))
#define UART_BAUD_57600 ((uint16)(((UART_CLK / 16) / 57600 ) - 1))
#define UART_BAUD_115200 ((uint16)(((UART_CLK / 16) / 115200) - 1))
#define UART_BAUD_230400 ((uint16)(((UART_CLK / 16) / 230400) - 1))
#define UART_BAUD_460800 ((uint16)(((UART_CLK / 16) / 460800) - 1))
#define UART_BAUD_921600 ((uint16)(((UART_CLK / 16) / 921600) - 1))
#define UART_BAUD_2400 ((uint16)((UART_REFCLK / 2400 ) - 1))
#define UART_BAUD_4800 ((uint16)((UART_REFCLK / 4800 ) - 1))
#define UART_BAUD_9600 ((uint16)((UART_REFCLK / 9600 ) - 1))
#define UART_BAUD_14400 ((uint16)((UART_REFCLK / 14400 ) - 1))
#define UART_BAUD_19200 ((uint16)((UART_REFCLK / 19200 ) - 1))
#define UART_BAUD_28800 ((uint16)((UART_REFCLK / 28800 ) - 1))
#define UART_BAUD_38400 ((uint16)((UART_REFCLK / 38400 ) - 1))
#define UART_BAUD_57600 ((uint16)((UART_REFCLK / 57600 ) - 1))
#define UART_BAUD_115200 ((uint16)((UART_REFCLK / 115200) - 1))
#define UART_BAUD_230400 ((uint16)((UART_REFCLK / 230400) - 1))
#define UART_BAUD_460800 ((uint16)((UART_REFCLK / 460800) - 1))
#define UART_BAUD_921600 ((uint16)((UART_REFCLK / 921600) - 1))
/* UART MSR register bit definitions */

View File

@@ -1,7 +1,7 @@
/**************************************************************************
* lpc214x/lpc214X_lowputc.S
*
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -14,7 +14,7 @@
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name Gregory Nutt nor the names of its contributors may be
* 3. Neither the name NuttX nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
@@ -92,7 +92,7 @@
# error "No CONFIG_UARTn_PARITY Setting"
#endif
#ifdef LPC214X_UART_2STOP != 0
#if LPC214X_UART_2STOP != 0
# define LPC214X_LCR_STOP LPC214X_LCR_STOP_2
#else
# define LPC214X_LCR_STOP LPC214X_LCR_STOP_1

View File

@@ -1,7 +1,7 @@
/****************************************************************************
* lpc214x/lpc214x_serial.c
*
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -14,7 +14,7 @@
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name Gregory Nutt nor the names of its contributors may be
* 3. Neither the name NuttX nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
@@ -82,15 +82,17 @@ struct up_dev_s
static int up_setup(struct uart_dev_s *dev);
static void up_shutdown(struct uart_dev_s *dev);
static int up_attach(struct uart_dev_s *dev);
static void up_detach(struct uart_dev_s *dev);
static int up_interrupt(int irq, void *context);
static int up_ioctl(struct file *filep, int cmd, unsigned long arg);
static int up_receive(struct uart_dev_s *dev, uint32 *status);
static void up_rxint(struct uart_dev_s *dev, boolean enable);
static boolean up_rxfifonotempty(struct uart_dev_s *dev);
static boolean up_rxavailable(struct uart_dev_s *dev);
static void up_send(struct uart_dev_s *dev, int ch);
static void up_txint(struct uart_dev_s *dev, boolean enable);
static boolean up_txfifonotfull(struct uart_dev_s *dev);
static boolean up_txfifoempty(struct uart_dev_s *dev);
static boolean up_txready(struct uart_dev_s *dev);
static boolean up_txempty(struct uart_dev_s *dev);
/****************************************************************************
* Private Variables
@@ -100,15 +102,16 @@ struct uart_ops_s g_uart_ops =
{
.setup = up_setup,
.shutdown = up_shutdown,
.handler = up_interrupt,
.attach = up_attach,
.detach = up_detach,
.ioctl = up_ioctl,
.receive = up_receive,
.rxint = up_rxint,
.rxfifonotempty = up_rxfifonotempty,
.rxavailable = up_rxavailable,
.send = up_send,
.txint = up_txint,
.txfifonotfull = up_txfifonotfull,
.txfifoempty = up_txfifoempty,
.txready = up_txready,
.txempty = up_txempty,
};
/* I/O buffers */
@@ -124,6 +127,7 @@ static struct up_dev_s g_uart0priv =
{
.uartbase = LPC214X_UART0_BASE,
.baud = CONFIG_UART0_BAUD,
.irq = LPC214X_UART0_IRQ,
.parity = CONFIG_UART0_PARITY,
.bits = CONFIG_UART0_BITS,
.stopbits2 = CONFIG_UART0_2STOP,
@@ -131,7 +135,6 @@ static struct up_dev_s g_uart0priv =
static uart_dev_t g_uart0port =
{
.irq = LPC214X_UART0_IRQ,
.recv =
{
.size = CONFIG_UART0_RXBUFSIZE,
@@ -152,6 +155,7 @@ static struct up_dev_s g_uart1priv =
{
.uartbase = LPC214X_UART1_BASE,
.baud = CONFIG_UART1_BAUD,
.irq = LPC214X_UART1_IRQ,
.parity = CONFIG_UART1_PARITY,
.bits = CONFIG_UART1_BITS,
.stopbits2 = CONFIG_UART1_2STOP,
@@ -159,7 +163,6 @@ static struct up_dev_s g_uart1priv =
static uart_dev_t g_uart1port =
{
.irq = LPC214X_UART1_IRQ,
.recv =
{
.size = CONFIG_UART1_RXBUFSIZE,
@@ -234,10 +237,10 @@ static inline void up_restoreuartint(struct up_dev_s *priv, ubyte ier)
}
/****************************************************************************
* Name: up_waittxfifonotfull
* Name: up_waittxready
****************************************************************************/
static inline void up_waittxfifonotfull(struct up_dev_s *priv)
static inline void up_waittxready(struct up_dev_s *priv)
{
int tmp;
@@ -283,7 +286,7 @@ static inline void up_enablebreaks(struct up_dev_s *priv, boolean enable)
static int up_setup(struct uart_dev_s *dev)
{
#ifdef CONFIG_SUPPRESS_LPC214X_UART_CONFIG
#ifndef CONFIG_SUPPRESS_LPC214X_UART_CONFIG
struct up_dev_s *priv = (struct up_dev_s*)dev->priv;
uint16 baud;
ubyte lcr;
@@ -299,11 +302,11 @@ static int up_setup(struct uart_dev_s *dev)
/* Set up the IER */
priv->ier = up_serialin(priv, LPC214X_UART_IER_OFFSET);
/* Set up the LCR */
lcr = 0;
if (priv->bits == 7)
{
lcr |= LPC214X_LCR_CHAR_7;
@@ -317,7 +320,7 @@ static int up_setup(struct uart_dev_s *dev)
{
lcr |= LPC214X_LCR_STOP_2;
}
if (priv->parity == 1)
{
lcr |= LPC214X_LCR_PAR_ODD;
@@ -328,15 +331,15 @@ static int up_setup(struct uart_dev_s *dev)
}
/* Enter DLAB=1 */
up_serialout(priv, LPC214X_UART_LCR_OFFSET, (lcr | LPC214X_LCR_DLAB_ENABLE));
/* Set the BAUD divisor */
baud = UART_BAUD(priv->baud);
up_serialout(priv, LPC214X_UART_DLM_OFFSET, baud >> 8);
up_serialout(priv, LPC214X_UART_DLL_OFFSET, baud & 0xff);
/* Clear DLAB */
up_serialout(priv, LPC214X_UART_LCR_OFFSET, lcr);
@@ -359,6 +362,57 @@ static void up_shutdown(struct uart_dev_s *dev)
up_disableuartint(priv, NULL);
}
/****************************************************************************
* Name: up_attach
*
* Description:
* Configure the UART to operation in interrupt driven mode. This method is
* called when the serial port is opened. Normally, this is just after the
* the setup() method is called, however, the serial console may operate in
* a non-interrupt driven mode during the boot phase.
*
* RX and TX interrupts are not enabled when by the attach method (unless the
* hardware supports multiple levels of interrupt enabling). The RX and TX
* interrupts are not enabled until the txint() and rxint() methods are called.
*
****************************************************************************/
static int up_attach(struct uart_dev_s *dev)
{
struct up_dev_s *priv = (struct up_dev_s*)dev->priv;
int ret;
/* Attach and enable the IRQ */
ret = irq_attach(priv->irq, up_interrupt);
if (ret == OK)
{
/* Enable the interrupt (RX and TX interrupts are still disabled
* in the UART
*/
up_enable_irq(priv->irq);
}
return ret;
}
/****************************************************************************
* Name: up_detach
*
* Description:
* Detach UART interrupts. This method is called when the serial port is
* closed normally just before the shutdown method is called. The exception is
* the serial console which is never shutdown.
*
****************************************************************************/
static void up_detach(struct uart_dev_s *dev)
{
struct up_dev_s *priv = (struct up_dev_s*)dev->priv;
up_disable_irq(priv->irq);
irq_detach(priv->irq);
}
/****************************************************************************
* Name: up_interrupt
*
@@ -379,11 +433,11 @@ static int up_interrupt(int irq, void *context)
ubyte status;
int passes;
if (g_uart1port.irq == irq)
if (g_uart1priv.irq == irq)
{
dev = &g_uart1port;
}
else if (g_uart0port.irq == irq)
else if (g_uart0priv.irq == irq)
{
dev = &g_uart0port;
}
@@ -548,14 +602,14 @@ static void up_rxint(struct uart_dev_s *dev, boolean enable)
}
/****************************************************************************
* Name: up_rxfifonotempty
* Name: up_rxavailable
*
* Description:
* Return TRUE if the receive fifo is not empty
*
****************************************************************************/
static boolean up_rxfifonotempty(struct uart_dev_s *dev)
static boolean up_rxavailable(struct uart_dev_s *dev)
{
struct up_dev_s *priv = (struct up_dev_s*)dev->priv;
return ((up_serialin(priv, LPC214X_UART_LSR_OFFSET) & LPC214X_LSR_RDR) != 0);
@@ -600,28 +654,28 @@ static void up_txint(struct uart_dev_s *dev, boolean enable)
}
/****************************************************************************
* Name: up_txfifonotfull
* Name: up_txready
*
* Description:
* Return TRUE if the tranmsit fifo is not full
*
****************************************************************************/
static boolean up_txfifonotfull(struct uart_dev_s *dev)
static boolean up_txready(struct uart_dev_s *dev)
{
struct up_dev_s *priv = (struct up_dev_s*)dev->priv;
return ((up_serialin(priv, LPC214X_UART_LSR_OFFSET) & LPC214X_LSR_THRE) != 0);
}
/****************************************************************************
* Name: up_txfifoempty
* Name: up_txempty
*
* Description:
* Return TRUE if the transmit fifo is empty
*
****************************************************************************/
static boolean up_txfifoempty(struct uart_dev_s *dev)
static boolean up_txempty(struct uart_dev_s *dev)
{
struct up_dev_s *priv = (struct up_dev_s*)dev->priv;
return ((up_serialin(priv, LPC214X_UART_LSR_OFFSET) & LPC214X_LSR_THRE) != 0);
@@ -692,7 +746,7 @@ int up_putc(int ch)
ubyte ier;
up_disableuartint(priv, &ier);
up_waittxfifonotfull(priv);
up_waittxready(priv);
up_serialout(priv, LPC214X_UART_THR_OFFSET, (ubyte)ch);
/* Check for LF */
@@ -701,11 +755,11 @@ int up_putc(int ch)
{
/* Add CR */
up_waittxfifonotfull(priv);
up_waittxready(priv);
up_serialout(priv, LPC214X_UART_THR_OFFSET, '\r');
}
up_waittxfifonotfull(priv);
up_waittxready(priv);
up_restoreuartint(priv, ier);
return ch;
}

View File

@@ -1,7 +1,7 @@
############################################################
# Makefile
############################################################################
# arch/c5471/src/Makefile
#
# Copyright (C) 2007 Gregory Nutt. All rights reserved.
# Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
#
# Redistribution and use in source and binary forms, with or without
@@ -14,7 +14,7 @@
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# 3. Neither the name Gregory Nutt nor the names of its contributors may be
# 3. Neither the name NuttX nor the names of its contributors may be
# used to endorse or promote products derived from this software
# without specific prior written permission.
#
@@ -31,11 +31,10 @@
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
############################################################
############################################################################
-include $(TOPDIR)/Make.defs
MKDEP = $(TOPDIR)/tools/mkdeps.sh
CFLAGS += -I$(TOPDIR)/sched
ASRCS = up_vectors.S up_saveusercontext.S up_fullcontextrestore.S
@@ -72,15 +71,14 @@ LIBGCC = ${shell $(CC) -print-libgcc-file-name}
all: up_head.o libarch$(LIBEXT)
$(AOBJS) $(LINKOBJS): %.o: %.S
$(CC) -c $(CFLAGS) -D__ASSEMBLY__ $< -o $@
$(call ASSEMBLE, $<, $@)
$(COBJS): %.o: %.c
$(CC) -c $(CFLAGS) $< -o $@
$(call COMPILE, $<, $@)
libarch$(LIBEXT): $(OBJS)
( for obj in $(OBJS) ; do \
$(AR) $@ $${obj} || \
{ echo "$(AR) $@ $obj FAILED!" ; exit 1 ; } ; \
@( for obj in $(OBJS) ; do \
$(call ARCHIVE, $@, $${obj}); \
done ; )
board/libboard$(LIBEXT):
@@ -105,9 +103,9 @@ ifeq ($(CONFIG_RRLOAD_BINARY),y)
endif
.depend: Makefile $(SRCS)
$(MKDEP) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
$(MAKE) -C board TOPDIR=$(TOPDIR) depend
touch $@
@$(MKDEP) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
@$(MAKE) -C board TOPDIR=$(TOPDIR) depend
@touch $@
depend: .depend
@@ -115,7 +113,8 @@ clean:
@if [ -e board/Makefile ]; then \
$(MAKE) -C board TOPDIR=$(TOPDIR) clean ; \
fi
rm -f libarch$(LIBEXT) *.o *~
@rm -f libarch$(LIBEXT) *~ .*.swp
$(call CLEAN)
distclean: clean
@if [ -e board/Makefile ]; then \

View File

@@ -1,7 +1,7 @@
/************************************************************
/****************************************************************************
* up_exit.c
*
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -14,7 +14,7 @@
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name Gregory Nutt nor the names of its contributors may be
* 3. Neither the name NuttX nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
@@ -31,11 +31,11 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
************************************************************/
****************************************************************************/
/************************************************************
/****************************************************************************
* Included Files
************************************************************/
****************************************************************************/
#include <nuttx/config.h>
#include <sys/types.h>
@@ -49,28 +49,27 @@
#include <nuttx/fs.h>
#endif
/************************************************************
/****************************************************************************
* Private Definitions
************************************************************/
****************************************************************************/
/************************************************************
/****************************************************************************
* Private Data
************************************************************/
****************************************************************************/
/************************************************************
* Private Funtions
************************************************************/
/****************************************************************************
* Private Functions
****************************************************************************/
/************************************************************
/****************************************************************************
* Name: _up_dumponexit
*
* Description:
* Dump the state of all tasks whenever on task exits. This
* is debug instrumentation that was added to check file-
* related reference counting but could be useful again
* sometime in the future.
* Dump the state of all tasks whenever on task exits. This is debug
* instrumentation that was added to check file-related reference counting
* but could be useful again sometime in the future.
*
************************************************************/
****************************************************************************/
#if defined(CONFIG_DUMP_ON_EXIT) && defined(CONFIG_DEBUG)
static void _up_dumponexit(FAR _TCB *tcb, FAR void *arg)
@@ -113,23 +112,30 @@ static void _up_dumponexit(FAR _TCB *tcb, FAR void *arg)
}
#endif
/************************************************************
* Public Funtions
************************************************************/
/****************************************************************************
* Public Functions
****************************************************************************/
/************************************************************
/****************************************************************************
* Name: _exit
*
* Description:
* This function causes the currently executing task to cease
* to exist. This is a special case of task_delete().
* to exist. This is a special case of task_delete() where the task to
* be deleted is the currently executing task. It is more complex because
* a context switch must be perform to the the next ready to run task.
*
************************************************************/
****************************************************************************/
void _exit(int status)
{
_TCB* tcb = (_TCB*)g_readytorun.head;
irqstate_t flags = irqsave();
_TCB* tcb;
/* Disable interrupts. They will be restored when the next
* task is started.
*/
(void)irqsave();
lldbg("TCB=%p exitting\n", tcb);
@@ -138,37 +144,9 @@ void _exit(int status)
sched_foreach(_up_dumponexit, NULL);
#endif
/* Remove the tcb task from the ready-to-run list. We can
* ignore the return value because we know that a context
* switch is needed.
*/
/* Destroy the task at the head of the ready to run list. */
(void)sched_removereadytorun(tcb);
/* We are not in a bad stack-- the head of the ready to run task list
* does not correspond to the thread that is running. Disabling pre-
* emption on this TCB should be enough to keep things stable.
*/
sched_lock();
/* Move the TCB to the specified blocked task list and delete it */
sched_addblocked(tcb, TSTATE_TASK_INACTIVE);
task_delete(tcb->pid);
/* If there are any pending tasks, then add them to the g_readytorun
* task list now
*/
if (g_pendingtasks.head)
{
(void)sched_mergepending();
}
/* Now calling sched_unlock() should have no effect */
sched_unlock();
(void)task_deletecurrent();
/* Now, perform the context switch to the new ready-to-run task at the
* head of the list.

View File

@@ -60,7 +60,7 @@
#undef CONFIG_SUPPRESS_INTERRUPTS /* Do not enable interrupts */
#undef CONFIG_SUPPRESS_TIMER_INTS /* No timer */
#undef CONFIG_SUPPRESS_SERIAL_INTS /* Console will poll */
#undef CONFIG_SUPPRESS_UART_CONFIG /* Do not reconfig UART */
#define CONFIG_SUPPRESS_UART_CONFIG 1 /* Do not reconfig UART */
#undef CONFIG_DUMP_ON_EXIT /* Dump task state on exit */
/************************************************************

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,7 @@
############################################################
# Makefile
############################################################################
# arch/dm320/src/Makefile
#
# Copyright (C) 2007 Gregory Nutt. All rights reserved.
# Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
#
# Redistribution and use in source and binary forms, with or without
@@ -14,7 +14,7 @@
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# 3. Neither the name Gregory Nutt nor the names of its contributors may be
# 3. Neither the name NuttX nor the names of its contributors may be
# used to endorse or promote products derived from this software
# without specific prior written permission.
#
@@ -31,11 +31,10 @@
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
############################################################
############################################################################
-include $(TOPDIR)/Make.defs
MKDEP = $(TOPDIR)/tools/mkdeps.sh
CFLAGS += -I$(TOPDIR)/sched
ASRCS = up_vectors.S up_saveusercontext.S up_fullcontextrestore.S \
@@ -70,15 +69,14 @@ LIBGCC = ${shell $(CC) -print-libgcc-file-name}
all: up_head.o libarch$(LIBEXT)
$(AOBJS) $(LINKOBJS): %.o: %.S
$(CC) -c $(CFLAGS) -D__ASSEMBLY__ $< -o $@
$(call ASSEMBLE, $<, $@)
$(COBJS): %.o: %.c
$(CC) -c $(CFLAGS) $< -o $@
$(call COMPILE, $<, $@)
libarch$(LIBEXT): $(OBJS)
( for obj in $(OBJS) ; do \
$(AR) $@ $${obj} || \
{ echo "$(AR) $@ $obj FAILED!" ; exit 1 ; } ; \
@( for obj in $(OBJS) ; do \
$(call ARCHIVE, $@, $${obj}); \
done ; )
board/libboard$(LIBEXT):
@@ -106,8 +104,8 @@ endif
@if [ -e board/Makefile ]; then \
$(MAKE) -C board TOPDIR=$(TOPDIR) depend ; \
if
$(MKDEP) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
touch $@
@$(MKDEP) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
@touch $@
depend: .depend
@@ -115,12 +113,13 @@ clean:
@if [ -e board/Makefile ]; then \
$(MAKE) -C board TOPDIR=$(TOPDIR) clean ; \
fi
rm -f libarch$(LIBEXT) *.o *~
@rm -f libarch$(LIBEXT) *~ .*.swp
$(call CLEAN)
distclean: clean
@if [ -e board/Makefile ]; then \
$(MAKE) -C board TOPDIR=$(TOPDIR) distclean ; \
fi
rm -f Make.dep .depend
@rm -f Make.dep .depend
-include Make.dep

View File

@@ -1,7 +1,7 @@
/************************************************************
/****************************************************************************
* up_exit.c
*
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -14,7 +14,7 @@
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name Gregory Nutt nor the names of its contributors may be
* 3. Neither the name NuttX nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
@@ -31,11 +31,11 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
************************************************************/
****************************************************************************/
/************************************************************
/****************************************************************************
* Included Files
************************************************************/
****************************************************************************/
#include <nuttx/config.h>
#include <sys/types.h>
@@ -49,28 +49,27 @@
#include <nuttx/fs.h>
#endif
/************************************************************
/****************************************************************************
* Private Definitions
************************************************************/
****************************************************************************/
/************************************************************
/****************************************************************************
* Private Data
************************************************************/
****************************************************************************/
/************************************************************
* Private Funtions
************************************************************/
/****************************************************************************
* Private Functions
****************************************************************************/
/************************************************************
/****************************************************************************
* Name: _up_dumponexit
*
* Description:
* Dump the state of all tasks whenever on task exits. This
* is debug instrumentation that was added to check file-
* related reference counting but could be useful again
* sometime in the future.
* Dump the state of all tasks whenever on task exits. This is debug
* instrumentation that was added to check file-related reference counting
* but could be useful again sometime in the future.
*
************************************************************/
****************************************************************************/
#if defined(CONFIG_DUMP_ON_EXIT) && defined(CONFIG_DEBUG)
static void _up_dumponexit(FAR _TCB *tcb, FAR void *arg)
@@ -112,22 +111,24 @@ static void _up_dumponexit(FAR _TCB *tcb, FAR void *arg)
}
#endif
/************************************************************
* Public Funtions
************************************************************/
/****************************************************************************
* Public Functions
****************************************************************************/
/************************************************************
/****************************************************************************
* Name: _exit
*
* Description:
* This function causes the currently executing task to cease
* to exist. This is a special case of task_delete().
* to exist. This is a special case of task_delete() where the task to
* be deleted is the currently executing task. It is more complex because
* a context switch must be perform to the the next ready to run task.
*
************************************************************/
****************************************************************************/
void _exit(int status)
{
_TCB* tcb = (_TCB*)g_readytorun.head;
_TCB* tcb;
/* Disable interrupts. They will be restored when the next
* task is started.
@@ -138,41 +139,13 @@ void _exit(int status)
lldbg("TCB=%p exitting\n", tcb);
#if defined(CONFIG_DUMP_ON_EXIT) && defined(CONFIG_DEBUG)
dbg("Other tasks:\n");
lldbg("Other tasks:\n");
sched_foreach(_up_dumponexit, NULL);
#endif
/* Remove the tcb task from the ready-to-run list. We can
* ignore the return value because we know that a context
* switch is needed.
*/
/* Destroy the task at the head of the ready to run list. */
(void)sched_removereadytorun(tcb);
/* We are not in a bad stack-- the head of the ready to run task list
* does not correspond to the thread that is running. Disabling pre-
* emption on this TCB should be enough to keep things stable.
*/
sched_lock();
/* Move the TCB to the specified blocked task list and delete it */
sched_addblocked(tcb, TSTATE_TASK_INACTIVE);
task_delete(tcb->pid);
/* If there are any pending tasks, then add them to the g_readytorun
* task list now
*/
if (g_pendingtasks.head)
{
(void)sched_mergepending();
}
/* Now calling sched_unlock() should have no effect */
sched_unlock();
(void)task_deletecurrent();
/* Now, perform the context switch to the new ready-to-run task at the
* head of the list.

View File

@@ -52,7 +52,7 @@
#undef CONFIG_SUPPRESS_INTERRUPTS /* Do not enable interrupts */
#undef CONFIG_SUPPRESS_TIMER_INTS /* No timer */
#undef CONFIG_SUPPRESS_SERIAL_INTS /* Console will poll */
#undef CONFIG_SUPPRESS_UART_CONFIG /* Do not reconfig UART */
#define CONFIG_SUPPRESS_UART_CONFIG 1 /* Do not reconfig UART */
#define CONFIG_DUMP_ON_EXIT 1 /* Dump task state on exit */
/************************************************************

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,7 @@
############################################################
# Makefile
############################################################################
# arch/pjrc-8051/src/Makefile
#
# Copyright (C) 2007 Gregory Nutt. All rights reserved.
# Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
#
# Redistribution and use in source and binary forms, with or without
@@ -14,7 +14,7 @@
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# 3. Neither the name Gregory Nutt nor the names of its contributors may be
# 3. Neither the name NuttX nor the names of its contributors may be
# used to endorse or promote products derived from this software
# without specific prior written permission.
#
@@ -31,11 +31,10 @@
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
############################################################
############################################################################
-include $(TOPDIR)/Make.defs
MKDEP = $(TOPDIR)/tools/mkdeps.sh
CFLAGS += -I$(TOPDIR)/sched
ASFLAGS = -x -j -g -l -s -p
CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) -D__ASSEMBLY__
@@ -109,13 +108,13 @@ STACK_BASE = ${shell \
all: up_head$(OBJEXT) libarch$(LIBEXT)
$(ASRCS) $(LINKASRCS): %$(ASMEXT): %.S
$(CPP) -P $(CPPFLAGS) -D__ASSEMBLY__ $< -o $@
$(CPP) -P $(CPPFLAGS) $< -o $@
$(AOBJS) $(LINKOBJS): $(ASRCS) $(LINKASRCS)
$(AS) $(ASFLAGS) $<
$(call ASSEMBLE, $<, $@)
$(COBJS) $(TESTOBJS): %$(OBJEXT): %.c
$(CC) -c $(CFLAGS) $< -o $@
$(call COMPILE, $<, $@)
# Create a header file that contains addressing information needed by the code
@@ -148,8 +147,7 @@ up_mem.h: pass1.mem
libarch$(LIBEXT): up_mem.h $(OBJS)
@( for obj in $(OBJS) ; do \
$(AR) $@ $${obj} || \
{ echo "$(AR) $@ $${obj} FAILED!" ; exit 1 ; } ; \
$(call ARCHIVE, $@, $${obj}); \
done ; )
# This is a kludge to work around some conflicting symbols in libsdcc.liXqueb
@@ -172,19 +170,21 @@ board/libboard$(LIBEXT):
# This target builds the final executable
pass1.ihx: up_mem.h $(SDCCLIBDIR)/libmysdcc.lib $(LINKOBJS) board/libboard$(LIBEXT)
$(CC) $(LDFLAGS) $(LDPATHES) -L$(BOARDDIR) $(SDCCPATH) $(LINKOBJS) \
@echo "LD: $@"
@$(CC) $(LDFLAGS) $(LDPATHES) -L$(BOARDDIR) $(SDCCPATH) $(LINKOBJS) \
$(LDLIBS) -llibboard$(LIBEXT) $(SDCCLIBS) -o $@
@rm -f up_mem.h
@rm -f up_allocateheap$(OBJEXT) libarch$(LIBEXT)
@$(MAKE) TOPDIR=$(TOPDIR) libarch$(LIBEXT)
nuttx.ihx: up_mem.h $(SDCCLIBDIR)/libmysdcc.lib $(LINKOBJS)
$(CC) $(LDFLAGS) $(LDPATHES) -L$(BOARDDIR) $(SDCCPATH) $(LINKOBJS) \
@echo "LD: $@"
@$(CC) $(LDFLAGS) $(LDPATHES) -L$(BOARDDIR) $(SDCCPATH) $(LINKOBJS) \
$(LDLIBS) -llibboard$(LIBEXT) $(SDCCLIBS) -o $@
nuttx$(EXEEXT): pass1.ihx nuttx.ihx
@rm -f pass1.*
packihx nuttx.ihx > $(TOPDIR)/nuttx$(EXEEXT)
@packihx nuttx.ihx > $(TOPDIR)/nuttx$(EXEEXT)
@cp -f nuttx.map $(TOPDIR)/.
# This target builds a test program to verify interrupt context switching. irqtest is
@@ -202,8 +202,8 @@ irqtest:
@if [ -e board/Makefile ]; then \
$(MAKE) -C board TOPDIR=$(TOPDIR) depend ; \
fi
$(MKDEP) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
touch $@
@$(MKDEP) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
@touch $@
depend: .depend
@@ -211,9 +211,8 @@ clean:
@if [ -e board/Makefile ]; then \
$(MAKE) -C board TOPDIR=$(TOPDIR) clean ; \
fi
rm -f libarch$(LIBEXT) up_mem.h
rm -f *.asm *.rel *.lst *.rst *.sym *.adb *.lnk *.map *.mem *.ihx *.hex *~
if [ ! -z "$(OBJEXT)" ]; then rm -f *$(OBJEXT); fi
@rm -f libarch$(LIBEXT) up_mem.h *~ .*.swp
$(call CLEAN)
distclean: clean
@if [ -e board/Makefile ]; then \

View File

@@ -1,7 +1,7 @@
/************************************************************
/****************************************************************************
* up_exit.c
*
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -14,7 +14,7 @@
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name Gregory Nutt nor the names of its contributors may be
* 3. Neither the name NuttX nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
@@ -31,11 +31,11 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
************************************************************/
****************************************************************************/
/************************************************************
/****************************************************************************
* Included Files
************************************************************/
****************************************************************************/
#include <nuttx/config.h>
#include <sys/types.h>
@@ -46,34 +46,36 @@
#include "os_internal.h"
#include "up_internal.h"
/************************************************************
/****************************************************************************
* Private Definitions
************************************************************/
****************************************************************************/
/************************************************************
/****************************************************************************
* Private Data
************************************************************/
****************************************************************************/
/************************************************************
* Private Funtions
************************************************************/
/****************************************************************************
* Private Functions
****************************************************************************/
/************************************************************
* Public Funtions
************************************************************/
/****************************************************************************
* Public Functions
****************************************************************************/
/************************************************************
/****************************************************************************
* Name: _exit
*
* Description:
* This function causes the currently executing task to cease
* to exist. This is a special case of task_delete().
* to exist. This is a special case of task_delete() where the task to
* be deleted is the currently executing task. It is more complex because
* a context switch must be perform to the the next ready to run task.
*
************************************************************/
****************************************************************************/
void _exit(int status)
{
FAR _TCB* tcb = (FAR _TCB*)g_readytorun.head;
FAR _TCB* tcb;
dbg("TCB=%p exitting\n", tcb);
@@ -83,37 +85,9 @@ void _exit(int status)
EA = 0;
/* Remove the tcb task from the ready-to-run list. We can
* ignore the return value because we know that a context
* switch is needed.
*/
/* Destroy the task at the head of the ready to run list. */
(void)sched_removereadytorun(tcb);
/* We are not in a bad stack-- the head of the ready to run task list
* does not correspond to the thread that is running. Disabling pre-
* emption on this TCB should be enough to keep things stable.
*/
sched_lock();
/* Move the TCB to the specified blocked task list and delete it */
sched_addblocked(tcb, TSTATE_TASK_INACTIVE);
task_delete(tcb->pid);
/* If there are any pending tasks, then add them to the g_readytorun
* task list now
*/
if (g_pendingtasks.head)
{
(void)sched_mergepending();
}
/* Now calling sched_unlock() should have no effect */
sched_unlock();
(void)task_deletecurrent();
/* Now, perform the context switch to the new ready-to-run task at the
* head of the list.

View File

@@ -38,10 +38,13 @@
************************************************************/
#include <nuttx/config.h>
#include <sys/types.h>
#include <sched.h>
#include <debug.h>
#include <nuttx/arch.h>
#include "clock_internal.h"
#include "os_internal.h"
#include "up_internal.h"

View File

@@ -1,7 +1,7 @@
############################################################
# Makefile
############################################################################
# arch/sim/src/Makefile
#
# Copyright (C) 2007 Gregory Nutt. All rights reserved.
# Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
#
# Redistribution and use in source and binary forms, with or without
@@ -14,7 +14,7 @@
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# 3. Neither the name Gregory Nutt nor the names of its contributors may be
# 3. Neither the name NuttX nor the names of its contributors may be
# used to endorse or promote products derived from this software
# without specific prior written permission.
#
@@ -31,11 +31,10 @@
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
############################################################
############################################################################
-include $(TOPDIR)/Make.defs
MKDEP = $(TOPDIR)/tools/mkdeps.sh
CFLAGS += -I$(TOPDIR)/sched
ASRCS = up_setjmp.S
@@ -61,9 +60,9 @@ SRCS = $(ASRCS) $(CSRCS) $(SPECSRCS)
OBJS = $(AOBJS) $(COBJS) $(SPECOBJS)
LDFLAGS = $(ARCHSCRIPT)
EXTRA_LIBS = -lc
STDLIBS = -lc
ifeq ($(CONFIG_FS_FAT),y)
EXTRA_LIBS += -lz
STDLIBS += -lz
endif
LINKOBJS = up_head$(OBJEXT)
@@ -74,23 +73,23 @@ LDLIBS = $(patsubst lib%,-l%,$(basename $(notdir $(LINKLIBS))))
all: up_head$(OBJEXT) libarch$(LIBEXT)
$(AOBJS): %$(OBJEXT): %.S
$(CC) -c $(CFLAGS) -D__ASSEMBLY__ $< -o $@
$(call ASSEMBLE, $<, $@)
$(COBJS) $(LINKOBJS): %$(OBJEXT): %.c
$(CC) -c $(CFLAGS) $< -o $@
$(call COMPILE, $<, $@)
$(SPECOBJS): %$(OBJEXT): %.c
$(CC) -c $(HOSTCFLAGS) $< -o $@
libarch$(LIBEXT): $(OBJS)
@( for obj in $(OBJS) ; do \
$(AR) $@ $${obj} || \
{ echo "$(AR) $@ $obj FAILED!" ; exit 1 ; } ; \
$(call ARCHIVE, $@, $${obj}); \
done ; )
nuttx$(EXEEXT): $(LINKOBJS)
$(CC) $(LDFLAGS) $(LDPATHES) -o $(TOPDIR)/$@ $(LINKOBJS) \
-Wl,--start-group $(LDLIBS) -Wl,--end-group $(EXTRA_LIBS)
@echo "LD: nuttx$(EXEEXT)"
@$(CC) $(LDFLAGS) $(LDPATHES) -o $(TOPDIR)/$@ $(LINKOBJS) \
-Wl,--start-group $(LDLIBS) -Wl,--end-group $(STDLIBS) $(EXTRA_LIBS)
@$(NM) $(TOPDIR)/$@ | \
grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \
sort > $(TOPDIR)/System.map
@@ -102,8 +101,8 @@ nuttx$(EXEEXT): $(LINKOBJS)
depend: .depend
clean:
@rm -f libarch$(LIBEXT) *~
@if [ ! -z "$(OBJEXT)" ]; then rm -f *$(OBJEXT); fi
@rm -f libarch$(LIBEXT) *~ .*.swp
$(call CLEAN)
distclean: clean
@rm -f Make.dep .depend

View File

@@ -94,7 +94,7 @@ void up_block_task(_TCB *tcb, tstate_t task_state)
_TCB *rtcb = (_TCB*)g_readytorun.head;
boolean switch_needed;
dbg("Blocking TCB=%p\n", tcb);
sdbg("Blocking TCB=%p\n", tcb);
/* Remove the tcb task from the ready-to-run list. If we
* are blocking the task at the head of the task list (the
@@ -134,7 +134,7 @@ void up_block_task(_TCB *tcb, tstate_t task_state)
*/
rtcb = (_TCB*)g_readytorun.head;
dbg("New Active Task TCB=%p\n", rtcb);
sdbg("New Active Task TCB=%p\n", rtcb);
/* The way that we handle signals in the simulation is kind of
* a kludge. This would be unsafe in a truly multi-threaded, interrupt
@@ -143,7 +143,7 @@ void up_block_task(_TCB *tcb, tstate_t task_state)
if (rtcb->xcp.sigdeliver)
{
dbg("Delivering signals TCB=%p\n", rtcb);
sdbg("Delivering signals TCB=%p\n", rtcb);
((sig_deliver_t)rtcb->xcp.sigdeliver)(rtcb);
rtcb->xcp.sigdeliver = NULL;
}

View File

@@ -55,7 +55,7 @@
****************************************************************************/
#ifdef VFAT_STANDALONE
# define dbg(format, arg...) printf(format, ##arg)
# define sdbg(format, arg...) printf(format, ##arg)
#endif
/****************************************************************************
@@ -218,7 +218,7 @@ char *up_deviceimage(void)
ret = inflateInit(&strm);
if (ret != Z_OK)
{
dbg("inflateInit FAILED: ret=%d msg=\"%s\"\n", ret, strm.msg ? strm.msg : "No message" );
sdbg("inflateInit FAILED: ret=%d msg=\"%s\"\n", ret, strm.msg ? strm.msg : "No message" );
return NULL;
}
@@ -252,7 +252,7 @@ char *up_deviceimage(void)
case Z_DATA_ERROR:
case Z_MEM_ERROR:
case Z_STREAM_ERROR:
dbg("inflate FAILED: ret=%d msg=\"%s\"\n", ret, strm.msg ? strm.msg : "No message" );
sdbg("inflate FAILED: ret=%d msg=\"%s\"\n", ret, strm.msg ? strm.msg : "No message" );
(void)inflateEnd(&strm);
free(pbuffer);
return NULL;

View File

@@ -1,7 +1,7 @@
/************************************************************
/****************************************************************************
* up_exit.c
*
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -14,7 +14,7 @@
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name Gregory Nutt nor the names of its contributors may be
* 3. Neither the name NuttX nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
@@ -31,11 +31,11 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
************************************************************/
****************************************************************************/
/************************************************************
/****************************************************************************
* Included Files
************************************************************/
****************************************************************************/
#include <nuttx/config.h>
#include <sys/types.h>
@@ -45,75 +45,49 @@
#include "os_internal.h"
#include "up_internal.h"
/************************************************************
/****************************************************************************
* Private Definitions
************************************************************/
****************************************************************************/
/************************************************************
/****************************************************************************
* Private Data
************************************************************/
****************************************************************************/
/************************************************************
* Private Funtions
************************************************************/
/****************************************************************************
* Private Functions
****************************************************************************/
/************************************************************
* Public Funtions
************************************************************/
/****************************************************************************
* Public Functions
****************************************************************************/
/************************************************************
/****************************************************************************
* Name: _exit
*
* Description:
* This function causes the currently executing task to cease
* to exist. This is a special case of task_delete().
* to exist. This is a special case of task_delete() where the task to
* be deleted is the currently executing task. It is more complex because
* a context switch must be perform to the the next ready to run task.
*
************************************************************/
****************************************************************************/
void _exit(int status)
{
_TCB* tcb = (_TCB*)g_readytorun.head;
_TCB* tcb;
dbg("TCB=%p exitting\n", tcb);
sdbg("TCB=%p exitting\n", tcb);
/* Remove the tcb task from the ready-to-run list. We can
* ignore the return value because we know that a context
* switch is needed.
*/
/* Destroy the task at the head of the ready to run list. */
(void)sched_removereadytorun(tcb);
/* We are not in a bad stack-- the head of the ready to run task list
* does not correspond to the thread that is running. Disabling pre-
* emption on this TCB should be enough to keep things stable.
*/
sched_lock();
/* Move the TCB to the specified blocked task list and delete it */
sched_addblocked(tcb, TSTATE_TASK_INACTIVE);
task_delete(tcb->pid);
/* If there are any pending tasks, then add them to the g_readytorun
* task list now.
*/
if (g_pendingtasks.head)
{
(void)sched_mergepending();
}
/* Now calling sched_unlock() should have no effect */
sched_unlock();
(void)task_deletecurrent();
/* Now, perform the context switch to the new ready-to-run task at the
* head of the list.
*/
tcb = (_TCB*)g_readytorun.head;
dbg("New Active Task TCB=%p\n", tcb);
sdbg("New Active Task TCB=%p\n", tcb);
/* The way that we handle signals in the simulation is kind of
* a kludge. This would be unsafe in a truly multi-threaded, interrupt
@@ -122,7 +96,7 @@ void _exit(int status)
if (tcb->xcp.sigdeliver)
{
dbg("Delivering signals TCB=%p\n", tcb);
sdbg("Delivering signals TCB=%p\n", tcb);
((sig_deliver_t)tcb->xcp.sigdeliver)(tcb);
tcb->xcp.sigdeliver = NULL;
}

View File

@@ -76,7 +76,7 @@ void up_release_pending(void)
{
_TCB *rtcb = (_TCB*)g_readytorun.head;
dbg("From TCB=%p\n", rtcb);
sdbg("From TCB=%p\n", rtcb);
/* Merge the g_pendingtasks list into the g_readytorun task list */
@@ -96,7 +96,7 @@ void up_release_pending(void)
*/
rtcb = (_TCB*)g_readytorun.head;
dbg("New Active Task TCB=%p\n", rtcb);
sdbg("New Active Task TCB=%p\n", rtcb);
/* The way that we handle signals in the simulation is kind of
* a kludge. This would be unsafe in a truly multi-threaded, interrupt
@@ -105,7 +105,7 @@ void up_release_pending(void)
if (rtcb->xcp.sigdeliver)
{
dbg("Delivering signals TCB=%p\n", rtcb);
sdbg("Delivering signals TCB=%p\n", rtcb);
((sig_deliver_t)rtcb->xcp.sigdeliver)(rtcb);
rtcb->xcp.sigdeliver = NULL;
}

View File

@@ -97,7 +97,7 @@ void up_reprioritize_rtr(_TCB *tcb, ubyte priority)
_TCB *rtcb = (_TCB*)g_readytorun.head;
boolean switch_needed;
dbg("TCB=%p PRI=%d\n", tcb, priority);
sdbg("TCB=%p PRI=%d\n", tcb, priority);
/* Remove the tcb task from the ready-to-run list.
* sched_removereadytorun will return TRUE if we just
@@ -146,7 +146,7 @@ void up_reprioritize_rtr(_TCB *tcb, ubyte priority)
*/
rtcb = (_TCB*)g_readytorun.head;
dbg("New Active Task TCB=%p\n", rtcb);
sdbg("New Active Task TCB=%p\n", rtcb);
/* The way that we handle signals in the simulation is kind of
* a kludge. This would be unsafe in a truly multi-threaded, interrupt
@@ -155,7 +155,7 @@ void up_reprioritize_rtr(_TCB *tcb, ubyte priority)
if (rtcb->xcp.sigdeliver)
{
dbg("Delivering signals TCB=%p\n", rtcb);
sdbg("Delivering signals TCB=%p\n", rtcb);
((sig_deliver_t)rtcb->xcp.sigdeliver)(rtcb);
rtcb->xcp.sigdeliver = NULL;
}

View File

@@ -50,6 +50,7 @@
#include <sched.h>
#include <nuttx/net.h>
#include <net/ethernet.h>
#include <net/uip/uip.h>
#include <net/uip/uip-arch.h>
#include <net/uip/uip-arp.h>
@@ -60,7 +61,7 @@
* Private Definitions
****************************************************************************/
#define BUF ((struct uip_eth_hdr *)g_sim_dev.d_buf)
#define BUF ((struct ether_header*)g_sim_dev.d_buf)
/****************************************************************************
* Private Types
@@ -106,9 +107,9 @@ void timer_reset(struct timer *t)
#ifdef CONFIG_NET_PROMISCUOUS
# define up_comparemac(a,b) (0)
#else
static inline int up_comparemac(struct uip_eth_addr *paddr1, struct uip_eth_addr *paddr2)
static inline int up_comparemac(uint8 *paddr1, struct ether_addr *paddr2)
{
return memcmp(paddr1, paddr2, sizeof(struct uip_eth_addr));
return memcmp(paddr1, paddr2->ether_addr_octet, ETHER_ADDR_LEN);
}
#endif
@@ -155,14 +156,14 @@ void uipdriver_loop(void)
* MAC address
*/
if (g_sim_dev.d_len > UIP_LLH_LEN && up_comparemac( &BUF->dest, &g_sim_dev.d_mac) == 0)
if (g_sim_dev.d_len > UIP_LLH_LEN && up_comparemac(BUF->ether_dhost, &g_sim_dev.d_mac) == 0)
{
/* We only accept IP packets of the configured type and ARP packets */
#ifdef CONFIG_NET_IPv6
if (BUF->type == htons(UIP_ETHTYPE_IP6))
if (BUF->ether_type == htons(UIP_ETHTYPE_IP6))
#else
if (BUF->type == htons(UIP_ETHTYPE_IP))
if (BUF->ether_type == htons(UIP_ETHTYPE_IP))
#endif
{
uip_arp_ipin();
@@ -179,7 +180,7 @@ void uipdriver_loop(void)
tapdev_send(g_sim_dev.d_buf, g_sim_dev.d_len);
}
}
else if (BUF->type == htons(UIP_ETHTYPE_ARP))
else if (BUF->ether_type == htons(UIP_ETHTYPE_ARP))
{
uip_arp_arpin(&g_sim_dev);
@@ -201,7 +202,7 @@ void uipdriver_loop(void)
else if (timer_expired(&g_periodic_timer))
{
timer_reset(&g_periodic_timer);
uip_poll(&g_sim_dev, sim_uiptxpoll, 1);
uip_timer(&g_sim_dev, sim_uiptxpoll, 1);
}
sched_unlock();
}
@@ -212,7 +213,7 @@ int uipdriver_init(void)
timer_set(&g_periodic_timer, 500);
tapdev_init();
(void)tapdev_getmacaddr(g_sim_dev.d_mac.addr);
(void)tapdev_getmacaddr(g_sim_dev.d_mac.ether_addr_octet);
/* Register the device with the OS so that socket IOCTLs can be performed */

View File

@@ -90,7 +90,7 @@ void up_unblock_task(_TCB *tcb)
{
_TCB *rtcb = (_TCB*)g_readytorun.head;
dbg("Unblocking TCB=%p\n", tcb);
sdbg("Unblocking TCB=%p\n", tcb);
/* Remove the task from the blocked task list */
@@ -124,7 +124,7 @@ void up_unblock_task(_TCB *tcb)
*/
rtcb = (_TCB*)g_readytorun.head;
dbg("New Active Task TCB=%p\n", rtcb);
sdbg("New Active Task TCB=%p\n", rtcb);
/* The way that we handle signals in the simulation is kind of
* a kludge. This would be unsafe in a truly multi-threaded, interrupt
@@ -133,7 +133,7 @@ void up_unblock_task(_TCB *tcb)
if (rtcb->xcp.sigdeliver)
{
dbg("Delivering signals TCB=%p\n", rtcb);
sdbg("Delivering signals TCB=%p\n", rtcb);
((sig_deliver_t)rtcb->xcp.sigdeliver)(rtcb);
rtcb->xcp.sigdeliver = NULL;
}

80
arch/z16/include/arch.h Normal file
View File

@@ -0,0 +1,80 @@
/****************************************************************************
* arch/arch.h
*
* Copyright (C) 2008 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the nameNuttX nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
****************************************************************************/
/* This file should never be included directed but, rather,
* only indirectly through nuttx/arch.h
*/
#ifndef __ARCH_ARCH_H
#define __ARCH_ARCH_H
/****************************************************************************
* Included Files
****************************************************************************/
/****************************************************************************
* Definitions
****************************************************************************/
/****************************************************************************
* Inline functions
****************************************************************************/
/****************************************************************************
* Public Types
****************************************************************************/
/****************************************************************************
* Public Variables
****************************************************************************/
/****************************************************************************
* Public Function Prototypes
****************************************************************************/
#ifdef __cplusplus
#define EXTERN extern "C"
extern "C" {
#else
#define EXTERN extern
#endif
#undef EXTERN
#ifdef __cplusplus
}
#endif
#endif /* __ARCH_ARCH_H */

Some files were not shown because too many files have changed in this diff Show More