Ported IMU drivers, MQTT client, TCP, UDP support in firmware.
Much-needed condensation of constants and debug methods pertaining to bus transactions. I am due to write up a new blog post. But until then, here is my informal log of compile sizes over the course of last night. GCC was given -O2 for each build.
text data bss dec hex
372372 2796 9392 384560 5de30 Starting point.
371700 2796 9392 383888 5db90 After splitting uint16_t _class_state into two 8-bit fields.
371700 2796 9392 383888 5db90 After condensing 4 bools (RNBase) into the above-mentioned field.
371708 2796 9392 383896 5db98 After condensing 5 bools (CPLDDriver).
371572 2796 9392 383760 5db10 After striking old interrupt logic. New baseline.
370132 2796 9392 382320 5d570 After condensing 1 bool (ADP8866).
367472 2796 9392 379660 5cb0c After condensing 4 bools (i2c-device).
277096 2776 9216 289088 46940 More miscellaneous bool condensation...
277184 2776 9232 289192 469a8 After enum conversion and BusOp state abstraction.
277144 2776 9216 289136 46970 Condensed BTQueueOp into BusOpcode enum.
277140 2776 9216 289132 4696c Condensed SPIQueueOp into BusOpcode enum.
276608 2776 9216 288600 46758 CPLD audit results in cuts. New baseline.
276508 2776 9256 288540 4671c Condensed SPIBus op state defs into BusOp enum.
276476 2776 9260 288512 46700 Condensed I2C opcode into BusOp enum.
276712 2776 9260 288748 467ec STM32F7 I2CAdapter compiles again following condensation.
276640 2776 9300 288716 467cc Further condensation of SPIBusOp into BusOp.
276624 2776 9300 288700 467bc More inline migrations into BusOp. About to extend another op class.
276608 2776 9300 288684 467ac Preparing to move I2CBusOp into conformance with new base class.
276336 2776 9300 288412 4669c I2CBusOp now extends BusOp.
276536 2776 9380 288692 467b4 CPLD no longer extends SPIDeviceWithRegisters.
276832 2776 9380 288988 468dc Added some CPLD tests.
277836 2776 9380 289992 46cc8 Widespread preprocessor work. Repaired console parser.
263676 2776 9380 275832 43578 Same code base. Built without console support.
9380 289992 // With console support flag....
9380 275832 // Without console support.
That's resting stack load, and total firmware size, respectively.
~14KB of ballast that isn't needed in anything but a debug build.
[4:19 AM] jspark311 Ok... much cruftiness was lost. r1 simplified the firmware *dramatically*.
Now that the bus-ops are contained for the moment, I can turn my attention to the the god-awful SPIDeviceWithRegisters class (which I am about to rip out and shit-can for good).
Too much complexity.
No longer required to deal with the heterogeneous bus topology of r0.
PR'ing... Not a bad 24 hours....
ManuvrOS: +1,763 −1,062 (lines in commit)
Digitabulum: +459 −346 (lines in commit)
And the firmware running on the new r1 board....
==< Kernel >===================================
-- bootstrap_completed yes
-- Digitabulum v0.0.1 Build date: May 26 2016 15:43:57
--
-- Current datetime
-- millis() 0x00000001
-- micros() 0x00000000
-- _ms_elapsed 0
-- getStackPointer() 0x200484f4
-- stack grows down
--
-- Queue depth: 0
-- Preallocation depth: 6
-- Prealloc starves: 0
-- events_destroyed: 0
-- burden_of_being_specific 0
-- idempotent_blocks 0
-- Lagged schedules 0
-- Total schedules: 1
-- Active schedules: 0
-- Subscribers: (10 total):
0: Kernel
1: CPLDDriver
2: LegendManager
3: I2CAdapter
4: ADP8866
5: RN4677
6: SDCard
7: IREmitter
8: HapticStrap
9: PMU
That's all of the drivers. The first 6 are nearly complete, and the PMU (power-management unit) can do some basic clock-scaling. The largest remaining task is direct hardware support.
jspark311: I can potentially make you an emulator in firmware now. lol
drquinn: woah, woudn't a firmware emulator be the actual glove?
jspark311: lol yeah. That's how close I'm getting.
drquinn: nice! can't wait to see where its at
jspark311: I have TCP, UDP, MQTT support in ManuvrOS now, so you could just connect with the browser.
drquinn: so you'd just have to snap on some TCP connector to the glove?
jspark311: No hardware involved... the firmware experiences a TCP socket in the same way as it does a bluetooth connection. So when the time comes, we just drop one transport class in for the other.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.