Commit Graph

203 Commits

Author SHA1 Message Date
Travis Geiselbrecht
6cb02526b7 [include][console] split lib/console.h into two
TL;DR most uses of lib/console.h -> lk/console_cmd.h

Move the part that lets a piece of code somewhere in the system to
define a console command from the actual lib/console api to start an
instance of the console. Move in almost every place the user of the
console command definition to the new header, lk/console_cmd.h which is
always in the include path.

Also remove most uses of testing for WITH_LIB_CONSOLE since you can
almost always just safely define it and then let the linker remove it.
2019-07-13 16:56:33 -07:00
Travis Geiselbrecht
35a8d555a3 [include] move almost all of the remainder of top level includes into a subdir
Examples are include/platform.h -> platform/include/platform.h
include/target.h -> target/include/target.h

The old model generally considered these to be Always There includes,
but they're starting to stick out more and more so may as well actually
follow the model that most of the rest of the system follows.
2019-07-13 16:09:27 -07:00
Travis Geiselbrecht
cba9e47987 [license] replace the longer full MIT license with a shorter one
Used scripts/replacelic. Everything seems to build fine.
2019-07-05 17:22:23 -07:00
Travis Geiselbrecht
d8fa82cb91 [formatting] run everything through codestyle
Almost nothing changes here except moving braces to the same line as the
function declaration. Everything else is largely whitespace changes and
a few dangling files with tab indents.

See scripts/codestyle
2019-06-19 21:02:24 -07:00
Travis Geiselbrecht
1b7a28efb8 [include][lk] fixup lk/ include path move 2019-06-19 19:46:11 -07:00
Travis Geiselbrecht
f98cef7992 [warnings] fix warnings across the entire code base
Fix or squelch all warnings in all code covered by buildall.
2018-12-16 17:33:22 -08:00
Travis Geiselbrecht
8cf28bbdcf [arch][riscv] Initial port to a riscv32 sifive target
Currently targets qemu's sifive_e machine, which is a split flash/ram
machine, much like the Sifive HiFive1. Untested as of yet on a real
HiFive1.

Basic support including interrupts and architectural timers in place.
2018-12-16 16:44:23 -08:00
Travis Geiselbrecht
5dea3e1933 [warnings] fix a few warnings introduced with newer version of gcc
Most of the warnings are new, such as needing to mark fallthroughs on
cases explicitly. A few are based on signed vs unsigned comparisons.

Disable one warning that was annoying about comparing null to arguments
marked nonnull.
2018-03-15 14:10:12 -07:00
Erik Gilling
cc60328989 [cdcserial] Refactor driver to support multiple channels. 2018-01-22 23:33:35 -08:00
Girts
61d06e19fc [lib/cbuf] [app/tests] fix off by one in lib/cbuf. add a test.
Previously, if tail was == 0, and we wrote exactly enough bytes to
the end of the buffer, then head would end up at 0 as well. This
would make the buffer instaneously empty, as head == tail.
2016-11-01 21:54:23 -04:00
John Grossman
0c782aa381 [spelling] signalling --> signaling (#162)
Switch from the UK spelling of signalling (also, signalled and
signaller) to the American spelling.
2016-09-07 15:29:56 -07:00
klemens
d0b90c2d68 [spelling] spelling-fixes. (not external/) 2016-08-25 17:30:34 -07:00
Gurjant Kalsi
87b40fda48 [usb][usbtest] Fix compile error in USB test app (missing parameter).
Endpoint type was added to USBC (interrupt, bulk, isoc, etc) but usbtest app was not updated to reflect this.
2016-07-15 14:04:50 -07:00
Gurjant Kalsi
604a2bff74 [ndebug] Move ndebug reset handshake from user endpoint to all endpoints.
NDebug sits and waits for a reset message before becoming active. I intend to
use this handshake for the system debug protocol as well as the high level
protocol so I'm pulling the logic for it up into the core ndebug utility
functions.
2016-04-19 18:27:10 -07:00
Gurjant Kalsi
ce0a3db705 [cdcserial][usb] Add a CDC-Serial USB Class Driver. 2016-04-18 17:03:04 -07:00
Gurjant Kalsi
05c646a39a [ndebug] Setup NDebug endpoints and create a bidirectional serial pipe over USB. 2016-04-18 12:07:34 -07:00
Travis Geiselbrecht
2423845505 [merge] merge in cortex-m fpu support changes 2016-03-30 20:28:18 -07:00
Gurjant Kalsi
1fa7f2c977 [usb] Allow client code to specify USB endpoint type. 2016-03-28 21:21:21 -07:00
Travis Geiselbrecht
f92aad2622 [merge] merge master into the cortex-m fpu working branch 2016-03-28 19:09:40 -07:00
Gurjant Kalsi
7dd294a62d [dartuino][bootloader] Changes as per code review. 2016-03-28 12:04:08 -07:00
Gurjant Kalsi
b28f754f78 [dartuino][bootloader] Add some more tracing to fsboot, look for proper system image name. 2016-03-09 16:08:27 -08:00
Gurjant Kalsi
fe0ef0c255 [dartuino][bootloader] Add Filesystem Boot. 2016-03-09 15:23:44 -08:00
Gurjant Kalsi
a8be9611cc [dartuino][bootloader] Get Bootloader USB working. 2016-03-09 15:23:25 -08:00
Gurjant Kalsi
42e76b1fc7 [ports] Add an API to dynamically add/remove ports from a port group. 2016-02-23 14:23:25 -08:00
Travis Geiselbrecht
a4ca0a6e00 [vmm] move most users of arch_mmu_query directly to vaddr_to_paddr() 2016-02-14 12:45:53 -08:00
Travis Geiselbrecht
d569c090ea [vim] remove vim expandtab comments on most of the files 2016-02-14 12:32:07 -08:00
Travis Geiselbrecht
2eb32a4369 [style] mass reformat all the non external code to 4 space indents
Ran everything through scripts/codestyle.space, which uses astyle
to generally follow K&R style.

Biggest non whitespace change is pulling brackets down on function
declarations, which I'm pretty ambivalent about, but astyle insists
on taking a stance
2016-02-14 12:24:01 -08:00
Travis Geiselbrecht
a7496980c0 [lib][stdio] fix the build after -fbuiltin and io changes 2016-02-07 16:05:46 -08:00
Eric Holland
3d7e1f4968 [arch][arm] changes to support cortex-m0 architecture 2016-01-17 17:35:06 -08:00
Brian Swetland
20513a9901 [app][mdebug] add JTAG support
- initial gpio implementation
- runs at about 6MHz, not optimized or adjustable yet
2016-01-11 15:38:48 -08:00
Brian Swetland
8fbbaccb2b [app][mdebug] update protocol for JTAG transactions 2016-01-11 15:38:48 -08:00
Travis Geiselbrecht
75a8ce0f63 [merge] merge dartuino sensor development branch 2016-01-05 16:39:00 -08:00
Travis Geiselbrecht
9c74f98fa9 [merge] merge mips development branch
Add support for mips architecture.
Currently supports particular generic target on qemu.
2015-12-08 14:23:38 -08:00
Travis Geiselbrecht
720dc32335 [app][tests][clock_test] keep running the test after the first failure 2015-12-02 18:32:28 -08:00
Eric Holland
94e1825854 [accelerometer]added app for interacting with accelerometer from console 2015-12-02 18:13:54 -08:00
Carlos Pizano
c8ec0024da [kernel][port] port group test
A basic port watcher.

BUG=
R=travisg@google.com

Review URL: https://codereview.chromium.org/1478653002 .
2015-12-02 12:32:09 -08:00
Travis Geiselbrecht
4ab14424bd [cppcheck] clean up a few suggestions from cppcheck 2015-11-24 15:08:38 -08:00
Carlos Pizano
614eaf166a [kernel][ports] Add basic ports functionality
Missing mostly more tests, specifically group tests.

BUG=none
R=travisg@google.com

Review URL: https://codereview.chromium.org/1437453002 .
2015-11-20 14:43:27 -08:00
Travis Geiselbrecht
09acdf8afe WIP arm-m fpu 2015-11-11 18:07:07 -08:00
Travis Geiselbrecht
6475660350 WIP checkpoint 2015-11-11 13:22:07 -08:00
Travis Geiselbrecht
420c557c6e WIP fpu bits 2015-11-09 16:30:16 -08:00
Zhu, Bing
b6647f5bef [arch][x86][fpu]Change naming convention for FPU flag
To align with lk/arm flag naming convention, FPU flag
ENABLE_FPU is changed to X86_WITH_FPU

Signed-off-by: Zhu, Bing <bing.zhu@intel.com>
2015-11-09 22:14:11 +08:00
Travis Geiselbrecht
491e47fbc6 [linker] align special sections on native pointer bounary
This fixes a bug in x86-64 where it was trying to default align
input sections on 16 byte boundaries, which was screwing up the
padding between structures.
2015-11-06 12:00:04 -08:00
Travis Geiselbrecht
2c52edce0b [app][tests] set ENABLE_FPU in arch/x86 targets, enable floating point tests 2015-10-27 13:19:07 -07:00
Travis Geiselbrecht
114a350e55 [linker] align all the special sections on 8 byte boundaries, remove x86-64 hack
A bit overkill for 32bit machines, but aligning all the special data structures
on 8 byte boundaries removes any special case for 64bit machines.
2015-10-26 17:01:34 -07:00
Travis Geiselbrecht
0e1ce411ba [make] add ability to set EXTRA_LINKER_SCRIPTS in modules
This allows for individual modules to extend the main linker script,
primarily to add their own sections to interate over.
Remove the main shared_* linker scripts.
2015-10-26 16:47:18 -07:00
Travis Geiselbrecht
35ebee0e40 [merge] branch 'heapswitch'
This picks up the major work of allowing multiple heap implementations
and enable dlmalloc as an alternate heap to the simple existing one
(now called 'miniheap').

Also added a novm page allocator for memory management on systems too small
or missing an mmu to have a vm. Not much more than a simple bitmap allocator
that the heap pulls from. Allows for other heaps and/or users of physical
memory to coexist and span multiple banks of memory.
2015-10-20 16:53:00 -07:00
Travis Geiselbrecht
3b2d7a268b [make] remove the need for a module to manually add $(LOCAL_DIR)/include to the global include path
Pretty much every module in the system was already doing it, so do it
automatically.
2015-10-19 19:07:16 -07:00
Travis Geiselbrecht
38f20ec0a1 [lib][console] add pointer type arg, switch some users to it.
Patch courtesy Erik Corry
2015-10-19 12:49:20 -07:00
Gurjant Kalsi
dc079d7327 [console][uart][shell] Created a crash-time shell and a polling based UART driver to use on panic. 2015-10-12 16:38:51 -07:00