FIx assumption that ports are adjacent in memory
Fix pin mask
Replace assembly startup file ported from STM with TI C startup file