25 Commits

Author SHA1 Message Date
Alex Richardson
99bf8f9c41 [clang] Fix -Wformat warnings
Use %hx for uint16_t instead of %hhx.
2023-04-23 17:23:31 -07:00
Travis Geiselbrecht
9a39da5651 [app] tweak app start to only run apps with entry points defined
Also remove a few empty extraneous app structs that are not doing
anything currently.
2022-04-29 20:38:15 -07:00
Travis Geiselbrecht
f7d8e2300c [warnings] add -Wshadow which helps detect local variables that override globals
Nothing particularly bad showed up but cleaned up a bit of code.
2020-07-25 16:49:25 -07:00
Travis Geiselbrecht
4edb93adde [lib][console] rename some console command types to be prefixed with console_
Some of the structures, notably 'cmd', in the lib console stuff are a
little too generically named and have collided with some other code
so prefix the names a bit more cleanly with console_

The change is largely mechanical, and folks with out of tree code can
easily switch by renaming:
cmd -> console_cmd
cmd_args -> console_cmd_args
cmd_block -> console_cmd_block
console_cmd -> console_cmd_func

Apologies if this breaks you but it should be pretty easy to fix.
2020-07-25 15:59:58 -07:00
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
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
Gurjant Kalsi
a6c8b005db [console] Use STATIC_COMMAND macro for all console command definitions
BUG=

Review URL: https://codereview.chromium.org/1348403002 .
2015-09-16 15:37:33 -07:00
Travis Geiselbrecht
842cb7a7ae [warnings] fix warnings post-smp
Most of the warnings are printf related due to lk_time_t now being defined as an
unsigned int instead of unsigned long.
2015-06-02 21:03:05 -07:00
Travis Geiselbrecht
e846e9e32e [app][stringtests] bump the buffer size to 2MB, to remove L2 caching effects 2014-08-02 15:49:22 -07:00
Travis Geiselbrecht
c66805275d [libc] remove warning in memset.c when compiled on 32bit machines 2014-08-02 15:49:22 -07:00
Travis Geiselbrecht
3f5de5d833 [app][stringtests] clean up the old asm files, make sure modern memset/memcopy works
Add reference C implementation to test/benchmark against.
2014-07-30 20:11:10 -07:00
Travis Geiselbrecht
3b07685da8 [warnings] knock out some 64bit warnings 2014-03-11 21:04:55 -07:00
Travis Geiselbrecht
33b94d9b97 [lib][libc][arm-m] add new arm-m optimized memcpy and memset routines 2014-03-09 03:37:18 -07:00
Travis Geiselbrecht
13db848328 [app][stringtests] add new assembly implementation of memcpy and memset for arm-m
Cortex-m devices like data to be moved in units of 64bit, but must be aligned.
Otherwise, moving a 32bit word at a time is fine at any alignment.
2014-03-09 01:51:58 -08:00
Dima Zavin
36c7735533 [libc][stdio] cleanup printf definition and clients
Move implementation to stdio.c to sit next to the other
stdio definitions that use the debug output functions. Keep
the declaration of it, though, in printf.h to sit next to
sprintf, etc.

Don't include printf.h directly in other places, rely on stdio.h
to properly pull in these functions.

Change-Id: I357cb04a5c78185b8fde908193b672326c2ee542
Signed-off-by: Dima Zavin <dima@android.com>
2013-08-05 10:04:29 -07:00
Travis Geiselbrecht
a6c70ee683 [app] run all of app/ through astyle 2012-10-31 21:49:13 -07:00
Travis Geiselbrecht
39705e6b98 [app][tests] knock out a few warnings 2012-10-30 21:04:58 -07:00
Travis Geiselbrecht
1262105ab9 [time] rename {big}time_t -> lk_{big}time_t
-This avoids a collision with posix time_t and makes gcc complain
less about printf format mismatches.
2012-10-06 11:22:15 -07:00
Travis Geiselbrecht
97cfd0bfa4 [make] update all of the rules.mk to use the new module system 2012-08-31 15:52:24 -07:00
Travis Geiselbrecht
668383c506 [app] change the app api to have an init and entry point 2009-01-24 21:45:36 -08:00
Travis Geiselbrecht
3f14b667d3 [app] convert the existing apps to the app modules, add new shell app to
contain the console
2009-01-24 21:21:54 -08:00
Travis Geiselbrecht
39dededa26 move all of the references to app/console to lib/console 2009-01-24 20:12:57 -08:00
Travis Geiselbrecht
eb9460542e [IO] rework dprintf to take a debug level, defined in DEBUGLEVEL
printf at the moment just calls dprintf, but soon will become
a seperate I/O queue.
2008-09-13 15:21:57 -07:00
Travis Geiselbrecht
1d0df69964 initial commit of lk (little kernel) project 2008-09-01 02:26:09 -07:00