Search This Blog

Saturday, July 28, 2018

Sonar for the visually impaired - bring up

Projects / Project Swiftlet  "Hello Hell Desk?" Original post date: 07/27/2015

I have been putting off doing this next part - working on porting ChibiOS. I guess that's one of the things on my to do list before the PCB comes back. Not into the whole makefile command line nor linux nor run weird environment over on Windows nor making my tool chain.

There is a new stable release of ChibiOS 3.0.0 here on July 12th which was 9 days ago. I guess that's the one I should be porting over.

The C compiler include path is as follows:


I am trying to play with RVCT. Right off the bat, the supplied "RVCT" assembly file don't work directly as they added a whole pile of C preprocessor junk to what should have been a simple assembly file.



  1. First thing to do is to right click the Project. In the Asm tab, add the "--cpreproc" option under Misc Control. This runs the assembly file through the C Processor, so now those proeprocessor command would work.
  2. Add in the include path: ".\myprojects;.\os\rt\ports\ARMCMx;.\os\rt\include" 
  3. Note: .\myproject is where I put the chconf.h.

At this point, I get the errors down to a manageable 2. So I guess it is not too bad so far. Next thing to do is to play with the starup code where the errors come from.

Right now I am just going to use the KL25 Freedom board files as initial port as it is the little brother of KL26 on the Teensy LC (minus the I2S.)


"The missing symbol is the result of a change in the keil compiler, $ become an escape character so it should be replaced by $$ in the linker settings. I will check both 2.6 and 3.0 projects."

Except we need "$$$$" where we had "$$". Fixing that, the OS compiles error free.

Bricked my Teensy LC after I erased the FLASH and try to program in a test image. What really happened is that ChibiOS code have poor RVCT and Freescale support. The supposedly stable code has not been verified!


Guess what guys? RVCT not only did not reserve a space at $400 for it, but nukes that .cfmconfig block away. If you now program this in, there is a very high chance that the chip has been irreversibly bricked. i.e. The bulk erase function is disabled too.

I modified the Freescale start up assembly code and it works as expected:


So lessons of the day:

  • Always check the map file!
  • Don't try to try to pretend that stuff is portable and even try to code that in C.
  • GCC section might not be portable across compiler.


No comments:

Post a Comment

Note: Only a member of this blog may post a comment.