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

PULPino port #58

Merged
merged 59 commits into from Jul 3, 2017
Merged

PULPino port #58

merged 59 commits into from Jul 3, 2017

Conversation

suehtamacv
Copy link
Contributor

Solves issue #55.

jlbirccyn and others added 30 commits May 30, 2017 19:32
@jlbirccyn
Copy link
Member

Hi

I did a quick review. In file goil/templates/build/build_py.goilTemplate you added code if target is riscv.

+cSourceList.append(projfile.ProjectFile("% !PROJECT %/tpl_vectors.c"))
+cSourceList.append(projfile.ProjectFile("% !PROJECT %/tpl_primary_irq.S"))

should be set using the OIL attribute GENERATED_FILE. Check the other targets in the templates/.../config hierarchy

+%
+if TARGET == "riscv/pulpino" then
+%
+PULPINO_PATH = os.environ.get('PULPINO_PATH','MUST_SET_PULPINO_PATH_ENV_VARIABLE')
+%
+end if
+%

Maybe this kind of thing can use an additional OIL attribute like NEEDS_ENV in the templates/.../config hierarchy to list the environment variables needed. In build.py.goilTemplate, a test could be generated for each of these attribute.

@suehtamacv
Copy link
Contributor Author

  1. The first issue was solved, i was weirdly not aware of the GENERATED_FILES option.
  2. The PULPINO_PATH variable is necessary to correctly compile the code, as it contains Modelsim simulation files and tools to program the FPGA board. I refer to $PULPINO_PATH in my build script. There is always the need to actually export this variable, as precised in my README, but no need to make the Python systems aware of its existence. I dropped these lines.

Believe it was the single root Trampoline file that I touched.

@suehtamacv
Copy link
Contributor Author

Another idea to solve the second point would be to include PULPino's repo as a submodule to Trampoline. The submodule would be cloned only after a user request with git submodule update (thus would not pollute this repository) and at least Trampoline would be self-contained. With PULPino in a known path, the user would be no longer be expected to indicate PULPino's location with $PULPINO_PATH...

Which solution do you think that works better with Trampoline ? Even with submodules Trampoline would still expect the user to "clone" PULPino and to run setup.csh, so I am not sure the gain is relevant enough to justify the change.

Regards.

@KamelHacene
Copy link
Contributor

KamelHacene commented Jun 26, 2017

Hi !

In fact we may need some way to generate checks in the build.py with goil (and maybe a goil option to force them to a value).

For the meantime, you can replicate the generation of the build.py file in goil/templates/build/riscv{/pulpino,}/ directory and do whatever you want in this file. Here's a patch that does this :

0002-pulpino-check-Add-PULPINO_PATH-environnment-variable.patch.txt

Plus, you can add other architecture-dependant oil relative checking in the goil/templates/check/riscv{/pulpino,} directory. Here's a patch that returns an error if trying to use Memory or Timing protection :

0001-pulpino-check-Warn-if-trying-to-use-Memory-Timing-pr.patch.txt

@suehtamacv
Copy link
Contributor Author

Hello,

The patches were applied !

Regards.

Copy link
Member

@jlbirccyn jlbirccyn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is ok for me

@jlbirccyn jlbirccyn merged commit 43dadf1 into TrampolineRTOS:master Jul 3, 2017
@jlbirccyn
Copy link
Member

Hello,

I merged the pull-request. Thank you very much for your contribution !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants