the learning process .

in this post , i am asking for something that would assist me personally so i don't know if this could be of any interest to the general perspective of the forum ,

anyway . i learned most of what i know about arduino from starting projects that i had no experience to complete for me to pick up the needed information along the way .
working with AVR micro-controllers has been very interesting and i did learn a ton of things , but now i want to upgrade to the ARM architecture . essentially it's the Raspberry PI . that escalated quickly i know , but i must aim too high for me to pick the biggest amount of knowledge possible.

my problem now , is the fact that i am unable to write a clear plan . the main goal is to write an operating system for the RPI out of assembly and nothing more than that .
which means that i can only use the assembly directives without using any predefined program structure . now , i did work with assembly for a long time so i am pretty much familiar with that .

what i have no clue about , is the structure of the ARM interface . and ways to deal with the necessary units like the MMU and such things .

so i want someone to point me at the beginning of the path to fully understand this .
the programming part is not a problem once i understand what the needed units are .

thank you

amine2:
the main goal is to write an operating system for the RPI out of assembly

it sounds you are affected by 機動戦士ガンダム Kidō Senshi Gandamu syndrome, one wants to build his/her mobile suit RX-78 in his garage, but he/she is not skilled enough (just to use an euphemism)

dally:
it sounds you are affected by 機動戦士ガンダム Kidō Senshi Gandamu syndrome, one wants to build his/her mobile suit RX-78 in his garage, but he/she is not skilled enough (just to use an euphemism)

well i think i am quite over that stage . i am not that dumb .
that's what people tell me everytime i started a project .
when i first decided to work with Micro-controllers people laughed at me , due to my limited experience .
now they ask me to help them write their own programs , never underestimate someone who lives with his parents and has huge amounts of free time .

dally:

Before the university I studied electronics. This was where my interest for programming was first discovered when we made a simple Z80-based computer on a breadboard and programmed it in assembly. When I was undergraduate (~8 years ago), i booked myself into a lot of laboratory activities, and, in order to pass examinations, I had to develop a little kernel in both assembly and C (and lately in modula/2) for the above board. It was a very great experience, as I was studying operating systems, embedded systems, digital electronics, so I mastered by practice inside the campus.

Then I got my bachelor degree in computer science, and I subscribed to the next step and laboratories, I did my homework (which of course includes more complex pieces of electronic, e.g. HDL, SoC, etc), I passed my examinations, and I got my Master's degree in computer science. Then I got a PhD in electronics, and I found a job, which has formed me into the business direction, where I have mastered concepts like the importance of being deadline-oriented, customers-oriented, budget-oriented, as constraints-oriented, while the university formed me in the scientific and research direction, providing me the genuine right concept of good programming (there are 3 examinations about that, and 7 books and different courses) and engineering development, two things that make the difference when you have to deal complex objects like "compilers", "drivers", "applications", "tools", "file systems" and "operating systems"

I mean, with all the respect, everyone is able to fill in code, few have the ability to design, and none of them has learnt from internet: that is the importance of university path

In my opinion, this is the linear path of the learning process, end to end, if you want to have things under control without wasting your (and other people's) time.

just my 50 cents

i don't believe in universities . i am probably gunna go to one , but in no way is it gunna be as good as the internet where you can study Python in the morning , modern art after breakfast and quantum mechanics at night .i also am not doing this for me to have a good good job or to feed myself , i really want to do it for myself .

amine2:
the main goal is to write an operating system for the RPI out of assembly and nothing more than that

The RPi already has a moderately good Operating System and the entire code is in the Public Domain as far as I know. And I guess it is mostly written in C/C++

Learning to write assember code for a microprocessor should be straightforward. Actually writing assembler code at the level of complexity needed for an Operating System would be pointless masochism. Add to which learning assembler would be trival compared to the complexities of learning to create an Operating System.

...R

this is only a kernel of RPI, now you need to add a minimal software for create a OS.
Starting even with something more "simple" type FreeRTOS or uC/OS It's very complicated, unthinkable for a single programmer.
at least that his name is not Tanenbaum

Robin2:
The RPi already has a moderately good Operating System and the entire code is in the Public Domain as far as I know. And I guess it is mostly written in C/C++

Learning to write assember code for a microprocessor should be straightforward. Actually writing assembler code at the level of complexity needed for an Operating System would be pointless masochism. Add to which learning assembler would be trival compared to the complexities of learning to create an Operating System.

...R

thank you Robin .

i am actually planning to write my own C compiler first . to make it all easier later on the long term .
i can write assembler code for a microprocessor already . my goal from this is to better understand the fabric of the system and the units , an Operating system is the best thing for that .

learning assembler is not enough , i wan't to write my own system from the ground up . just for the fun of it . i also know that it's a massive amount of work , all i have is free time

vbextreme:
this is only a kernel of RPI, now you need to add a minimal software for create a OS.
Starting even with something more "simple" type FreeRTOS or uC/OS It's very complicated, unthinkable for a single programmer.
at least that his name is not Tanenbaum

thank you very much for the useful links .

Robin2:
Learning to write assember code for a microprocessor should be straightforward

Assembly on CISC 90s is a piece of cake, assembly on RISC causes headaches

amine2:
i am actually planning to write my own C compiler first

amine2:
i wan't to write my own system from the ground up

LoL, definitely 機動戦士ガンダム Kidō Senshi Gandamu syndrome
I am 100% sure you have no idea about the effort behind the hood

You need to know the hardware pretty intimately to begin to match what's already free.

You can run ARM's without an O/S in your way (have to write your own bugs) using Arduino IDE at least for ARM's like the Due and the many compatibles available but I don't think that the Arduino IDE targets RPi or similar. There's also the STM boards, they have a very reasonable M4 board.
This way OWNS the board.

You -could- write your O/S with Arduino IDE. Unix is (mostly) written in C.
Maybe someone else already has.

You could write a DOS system where the OS part is called by apps and TSR's, does not run by itself.
What I liked about that was that my code OWNED the system. I've set up data collector/processors that ran for 4+ months without crashing (only stopped by user action and power-outs) because my code owned the system and it didn't do anything unexpected. SD cards are usually DOS formatted.
Maybe someone else already has.

amine2:
i am actually planning to write my own C compiler first

knowing how to write assembly does not mean knowing how to write a compiler.
For write a compiler you need to study and study and study and study...
good luck

vbextreme:
knowing how to write assembly does not mean knowing how to write a compiler.
For write a compiler you need to study and study and study and study...
good luck

thank you very much . in fact i don't think it's even going to be a C compiler , it's just gunna be a reduced format of assembly to accelerate the work on the program , writing the whole program in assembly is just not possible for me (would hit more than millions of lines if you do it with assembly) .

thank you GoforSmoke.

dally i know what the needed effort is , or at least i have some sort of a clue . and yes i think i have that syndrome . i have no issue with failure anyway , i just tend not to stop once i start and that's the thing i am counting on . thank you for notifying me with that do .

@dally, You have wrong a quote.

GoForSmoke:
You -could- write your O/S with Arduino IDE

definitively the best tips ever!
(50 cents for my dry sarcasm)

it's just gunna be a reduced format of assembly to accelerate the work on the program

you might be interested in this code:

(provides if/else/elseif and until/while capabilities for gnu assembler targets.)

macro-meta-programming, amazing :smiley:

westfw:
you might be interested in this code:
GitHub - WestfW/structured_gas: "Structured programming" macros for Gnu Assembler (gas)
(provides if/else/elseif and until/while capabilities for gnu assembler targets.)

thank you very much sir

macro-meta-programming, amazing

I'd be more impressed with myself if I wasn't duplicating functionality that I first found back in the 1970s.
One of the problems with programming in assembler on modern cpus is that not enough people DO it. Back when assembler was (by necessity) more popular, there was a lot of "support infrastructure" for programming in assembler that just doesn't seem to exist any more :frowning:

westfw:
Back when assembler was (by necessity) more popular, there was a lot of "support infrastructure" for programming in assembler that just doesn't seem to exist any more :frowning:

Back then cars had starting handles :slight_smile:

It's called progress.

Us old fogeys decry it.

...R