Skip to content
This repository has been archived by the owner on Jun 27, 2023. It is now read-only.
/ parm Public archive

🧀 PARM Project (Polytech ARM-based embedded processor), made as part of a school project.

License

Notifications You must be signed in to change notification settings

marcpinet/parm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Polytech ARM-based embedded processor

📋 Instructions we had to follow

By using Logisim, we firstly had to make a CPU (a simplified one) which can run binary files (machine code). You can find how to convert Clang files into Assembly files in the next section. Next, we had to make a program which can translate assembly language (ARMv7) into machine code.

You can learn more about Logisim, ARMv7 and the whole Cortex-M0 family of processors in the docs folder.

⚙️ Compile C to ARM Assembly using the CPU

To check whether our CPU works or not, we need to compile these C programs and compare each other.

Install the libc6-armel-cross, libc6-dev-armel-cross, binutils-arm-linux-gnueabi and libncurses5-dev packages by using the following command:

sudo apt-get install clang libc6-armel-cross libc6-dev-armel-cross binutils-arm-linux-gnueabi libncurses5-dev

Then, install gcc and g++ to support ARM:

sudo apt-get install gcc-arm-linux-gnueabi g++-arm-linux-gnueabi

Finally, you can compile like this:

clang -S -target arm-none-eabi -mcpu=cortex-m0 -O0 -mthumb -nostdlib -I./include main.c

Please, note that the ./include folder (which contains the headers) should be in the same directory of the main.c. You can see some examples in the c folder.

📽️ Presentation

See the presentation folder for more details.

🧾 Additional informations

C Headers

Program Description
crypto Cryptography
fixed Fixed Point Decimal Numbers
math Mathematical tools
parm Main Header
stdio Text Input/Output (keyboard, terminal)
string Basic implementation of strings
string2 Other basic implementation of strings
trigo Trigonometric functions (Taylor series)
utils Debugging Tools
video Matrix screen

C programs

Program Description
calckeyb Calculator with keyboard and terminal
calculator Calculator with DIP-switches
simple_add Adds two variables and displays it in RES
testfp Demonstrate fixed-point number macros
tty Display "Project PARM" in terminal

MMIO

See parm.h for the pins documentation.

✒️ Authors

About

🧀 PARM Project (Polytech ARM-based embedded processor), made as part of a school project.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published