OpenCyphal-Garage / demos

Demo applications and reference implementations
https://opencyphal.org
MIT License
14 stars 8 forks source link

copying over Abrahams demo #2

Closed thirtytwobits closed 3 years ago

thirtytwobits commented 3 years ago

@noxuz : I copied over your source from https://github.com/noxuz/libcanard_S32K1. It'll need some fixing up:

  1. compiler warning need to get cleared up.
  2. canfd.c should be moved into socketcan.c and should implement the socketcan.h contracts
  3. app.c (renamed from your main.c) should be refactored to do initialization on startup and the reset can mostly be removed since the main.c in this demo has all the mechanics in it.
  4. we need to implement monotonic_timer.h for the S32K146
  5. we need to implement register.h for the S32K146 (probably using the device's EEPROM)
pavel-kirienko commented 3 years ago

Can you or @noxuz please rebase it to main

thirtytwobits commented 3 years ago

Done

noxuz commented 3 years ago

Found this application note as reference for the FlexNVM functionality needed in register.h https://www.nxp.com/docs/en/application-note/AN11983.pdf

Also, @thirtytwobits what made platform/src/startup_S32K146.S to be mentioned in the generated makefile, (and Reset_handler to be found by the linker) is adding the ASM flag in the project macro here: https://github.com/thirtytwobits/demos/blob/s32k/ds015_servo/CMakeLists.txt#L19

But I saw you added the following that seems to be for the same purpouse, but this alone did'nt fix the behavior. https://github.com/thirtytwobits/demos/blob/s32k/ds015_servo/CMakeLists.txt#L96

thirtytwobits commented 3 years ago

Can we merge this?

pavel-kirienko commented 3 years ago

It's not finished yet. The to-do items from your first post are not yet addressed. Also, some demo with pictures would be nice.

thirtytwobits commented 3 years ago

right, but we're on a branch. Can we merge this so @noxuz can iterate on it?

pavel-kirienko commented 3 years ago

Ah sure, please go ahead