Skip to content
This repository was archived by the owner on Jul 29, 2022. It is now read-only.
/ SatelliteSim Public archive

Simulate Ex-alta 2's FreeRTOS environment on your Linux machine

License

Notifications You must be signed in to change notification settings

AlbertaSat/SatelliteSim

Repository files navigation

This is a free Rtos simulator for ex_alta_2

Starting the Simulator

To run this simulator, you'll need a linux machine. I'm using Ubuntu 18.

In the Project directory is where you'll find our source code. This is the code that we are actively simulating. The entry point for the Sim is found in main.c. If you want to test to see if your code will work with FreeRTOS, make a task, and add it to main.c.

To install currently running modules:

make sure to install the sub modules (our code) with
$ git submodule init

make sure to update the sub modules with $ git submodule update

You can make the simulator and associated apps with
$ make all

If you just want to link the object files without rebuilding everything, run
$ make SatelliteSim

We need to install libcsp manually

cd into libcsp and run ./waf configure --with-os=posix

If we want to build with reliance edge, we need to configure libcsp to 32bit mode then we need to change this line in build/c4che/_cache.py: CFLAGS = ['-Os', '-Wall', '-g', '-std=gnu99'] to this: CFLAGS = ['-Os', '-Wall', '-g', '-std=gnu99', '-m32']

Currently, we are running without the -m32 flag, so please just run:

./waf build

To Run

to run: ./SatelliteSim

the entry point of SatelliteSim is in /Project/main.c

Adding new code

I think the best way to add a new application is to make your app into a .a (archive) file. This is just a bundle of .o files. make an archive file with: $ ar -rsc name_of_archive.a obj.o ob1.o ob2.o ...

In the master makefile (the one in this directory) link your new .a file, add your .h files. To add your .h files, add it to INCLUDES, to include it in the include path, followed by your .a file to the STATIC_OBJ varable.

INCLUDES += -I$(SRCROOT)/Project/yourproject/include
STATIC_OBJS += $(SRCROOT)/Project/yourproject/your_app.a

Doing this should link your files, and make them run with the simulator, if you want your app to build when you call 'make all' add a $(make) command to the make all rule.

Docker instructions

to build the docker container run: docker build -t satsimulator:latest .

to run in a container: docker run satsimulator

About

Simulate Ex-alta 2's FreeRTOS environment on your Linux machine

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages