Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xxx baremetal #2

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Xxx baremetal #2

wants to merge 4 commits into from

Conversation

i4ki
Copy link
Contributor

@i4ki i4ki commented Nov 21, 2016

/cc @geyslan

I copied my term implementation from EnzOS and the printf implementation of libc from SmallerC to run the example debugger (#1 still unnamed as xxx) in bare metal. The script to build was part copy-pasted from other project of my own too.

Below is an screenshot of qemu:

2016-11-21-045556_728x434_scrot

The code of regs.c is the same (with exception that printf I'm using do not support tabs, then registers are separated by spaces).

Why I'm doing this? Because it would be very cool if we could build the debugger to run in a host OS (linux and so on) and on bare metal also.

But we'll need to find a good project layout and abstractions to make it work. Some way to separate system-dependent and system-independent code.

The code is a mess... It was only a hack/PoC and do not need a review from your side.

i4ki added 4 commits November 18, 2016 18:00
Signed-off-by: Tiago Natel de Moura <[email protected]>
Signed-off-by: Tiago Natel de Moura <[email protected]>
Signed-off-by: Tiago Natel de Moura <[email protected]>
Signed-off-by: Tiago Natel de Moura <[email protected]>
@i4ki i4ki requested a review from geyslan January 6, 2017 21:28
@geyslan
Copy link
Member

geyslan commented Jan 8, 2017

This is great! Baremetal debugging is a really nice idea. I liked it.
We've discussed on #1 about the project layout and more. 👍

@i4ki
Copy link
Contributor Author

i4ki commented Jan 8, 2017

The make baremetal works on your machine?

@geyslan
Copy link
Member

geyslan commented Jan 8, 2017

Not actually. Some errors in Makefile and/or make.sh. I'll try again later and do a review.

@i4ki
Copy link
Contributor Author

i4ki commented Jan 8, 2017

Maybe related to nash version... Some incompatible changes happened recently..

@geyslan
Copy link
Member

geyslan commented Jan 8, 2017

make baremetal error output:

cd ./scripts/.nash/lib && git clone [email protected]:NeowayLabs/nashlib.git
Cloning into 'nashlib'...
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
make: *** [Makefile:31: scripts/bin/nash] Error 128

$ git diff -U0

diff --git a/xxx/Makefile b/xxx/Makefile
index 3588020..577453c 100644
--- a/xxx/Makefile
+++ b/xxx/Makefile
@@ -23 +23 @@ scripts/BootProg:
-       cd scripts && git clone [email protected]:alexfru/BootProg.git
+       cd scripts && git clone https://github.com/alexfru/BootProg.git
@@ -31 +31 @@ $(NASHBIN):
-       cd $(NASHPATH)/lib && git clone [email protected]:NeowayLabs/nashlib.git
+       cd $(NASHPATH)/lib && git clone https://github.com/NeowayLabs/nashlib.git

make baremetal again...

cd scripts/BootProg && smlrcc mkimg144.c -o mkimg144
cd scripts/BootProg && nasm -f bin flp144.asm -o flp144.bin
NASHPATH=./scripts/.nash ./scripts/bin/nash ./make.sh baremetal
./make.sh:3:0: Failed to import path 'nashlib/sed'. The locations below have been tried:
 "./nashlib/sed", "./nashlib/sed.sh", "./scripts/.nash/lib/nashlib/sed", "./scripts/.nash/lib/nashlib/sed.sh"
make: *** [Makefile:37: baremetal] Error 1

@i4ki
Copy link
Contributor Author

i4ki commented Jan 8, 2017

Did you installed last nash version?

@geyslan
Copy link
Member

geyslan commented Jan 8, 2017

nash-git-r578.bca7991-1 from AUR, but I removed it and built a clone repo. Same error.

@geyslan geyslan removed their request for review June 17, 2024 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants