1
0
mirror of https://github.com/antonblanchard/microwatt.git synced 2026-01-11 23:43:15 +00:00

25 Commits

Author SHA1 Message Date
Dan Horák
bd5e4bafba hello_world: Debug print the gitinfo syscon register
.oOOo.
 ."      ".
 ;  .mw.  ;   Microwatt, it works.
  . '  ' .
   \ || /     HDL Git SHA1: 211d23c4ad4fb5-dirty
    ;..;
    ;..;
    `ww'

Signed-off-by: Dan Horák <dan@danny.cz>
Signed-off-by: Michael Neuling <mikey@neuling.org>
2022-08-29 14:59:01 +10:00
Anton Blanchard
ff442d1bdb Zero BSS in hello world test
While trying to reduce U/X state issues, I notice that our BSS is not
being initialised in the hello world test.

Signed-off-by: Anton Blanchard <anton@linux.ibm.com>
2022-06-08 15:20:07 +10:00
Anton Blanchard
bc4e6b7efe Reduce hello_world footprint to fit in 8kB
When building with yosys we assume hello_world fits in 8kB. There's
enough free space that we can adjust the linker script to make it fit.

Signed-off-by: Anton Blanchard <anton@linux.ibm.com>
2020-12-03 20:39:37 +11:00
Gustavo Romero
dee71e8f01 Enhance hello_world
This commit enhances hello_world.bin output by printing
a ASCII lightbulb, which turns out to be Microwatt's logo,
instead of simply a "Hello World" text message.

Signed-off-by: Gustavo Romero <gustavo.romero@protonmail.com>
2020-07-13 17:11:14 -03:00
Michael Neuling
b1c260599f Send line feed if we get a carriage return in hello world.
Signed-off-by: Michael Neuling <mikey@neuling.org>
2020-07-02 14:23:00 +10:00
Benjamin Herrenschmidt
d654667304 console: Add support for the 16550 UART
And rebuild various binaries

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2020-06-24 09:53:46 +10:00
Benjamin Herrenschmidt
e3941109af console: Cleanup console API
Use a more generic console_init() instead of potato_uart_init(),
and do the same for interrupt control. There should be no
change in behaviour.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2020-06-24 09:53:46 +10:00
Benjamin Herrenschmidt
803ee9ef35 Makefile: Improve clean a bit
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2020-05-15 20:49:09 +10:00
Benjamin Herrenschmidt
7bc118c7db console: Move console files
console.c goes to a new lib/ where we'll store other general utilities
and console.h goes to include/

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2020-05-15 20:48:58 +10:00
Benjamin Herrenschmidt
a87b86e54f console: Replace putstr with puts
It makes things a bit more standard and a bit nicer to read
without all those strlen(). Also console.c takes care of adding
the carriage returns before the linefeeds.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2020-05-15 20:48:47 +10:00
Benjamin Herrenschmidt
88b28a7b17 console: Improve putchar(), add puts()
Make putchar() match a standard prototype and add puts()

Also make puts() add carriage returns before linefeeds so the
users don't have to do it all over the place.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2020-05-14 23:12:22 +10:00
Benjamin Herrenschmidt
c5f5f50738 hello_world: Use new headers and frequency from syscon
This uses the new header files for register definitions and
extracts the core frequency from syscon rather than hard coding it.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2020-05-08 21:06:16 +10:00
Benjamin Herrenschmidt
3687486d36 Update hello_world for 100Mhz clock
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2020-05-08 11:41:06 +10:00
Paul Mackerras
102b304db7 Merge remote-tracking branch 'remotes/origin/master' 2020-05-06 14:15:22 +10:00
Paul Mackerras
cf4dfeca36 Change the default cross compiler prefix to powerpc64le-linux-gnu-
That is what is used by the packaged cross-compilers on (at least)
Fedora and Ubuntu.

Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
2020-04-29 11:37:02 +10:00
Michael Neuling
fc5f7506f8 Add calls to dis/enable potato uart IRQ
Signed-off-by: Michael Neuling <mikey@neuling.org>
2020-04-23 15:02:00 +10:00
Anton Blanchard
06b28be577 hello_world: Use Makefile automatic variables
Fix a few whitespace issues while here.

Signed-off-by: Anton Blanchard <anton@linux.ibm.com>
2020-04-16 17:38:07 +10:00
Paul Mackerras
04ec2115ad hello_world: Use ldcix/stdcix to access UART
This is one step towards ultimately removing the address-based
cache inhibit hack from dcache.vhdl.

Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
2020-04-03 12:10:31 +11:00
Paul Mackerras
abefafd70b hello_world: Adjust header inclusions and Makefile
Currently hello_world fails to build with distro cross compiler
packages such as Debian gcc-powerpc64-linux-gnu, because it doesn't
provide string.h or unistd.h.  In fact we don't need them, we just
need stddef.h.  This adds #include <stddef.h> to console.h to get
size_t defined.  We also add #include "console.h" to console.c.

The hello_world Makefile currently hard-codes CROSS_COMPILE on
non-PPC machines.  This means that a command like:

	$ CROSS_COMPILE=powerpc64le-linux-gnu- make

doesn't do what you expect; it just tries to use powerpc64le-linux-gcc
regardless.  Adding a '?' makes it do what one expects.

Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
2020-04-03 12:10:31 +11:00
Michael Neuling
96fbd61de8 Breakout the console code so it can be reused.
No functional change.

Signed-off-by: Michael Neuling <mikey@neuling.org>
2020-03-31 16:31:36 +11:00
Anton Blanchard
75f3614776 hello_world updates
Shrink hello_world a bit (from 12kB to 8kB).
Include the built images
Add 0x10 and 0x100 entry points

Signed-off-by: Anton Blanchard <anton@linux.ibm.com>
2020-01-19 18:17:15 +11:00
Anton Blanchard
9362f2dd10 Move bin2hex.py to scripts/
Signed-off-by: Anton Blanchard <anton@linux.ibm.com>
2020-01-11 21:31:48 +11:00
Anton Blanchard
0a0ad9b384 Rebuild hello world assuming a 50MHz clock
Signed-off-by: Anton Blanchard <anton@linux.ibm.com>
2019-08-26 22:09:28 +10:00
Dan Horák
2d7994dc12 don't cross compile when on Power 2019-08-24 14:02:35 +02:00
Anton Blanchard
8bc3e8ea0a Add a simple hello_world example that also echos input
Signed-off-by: Anton Blanchard <anton@linux.ibm.com>
2019-08-24 09:00:36 +10:00