Commit Graph

482 Commits

Author SHA1 Message Date
Émilie Feral
235ec73e8e [emscripten] Fix alignment issue
Emscripten expects 32 and 16-bit memory accesses to be aligned.
2018-04-18 11:20:39 +02:00
Romain Goyet
2f1ebf7310 [emscripten] Work around alignment issues
Emscripten expects 32 and 16-bit memory accesses to be aligned.
This happens automatically most of the time, but in the case of our
Storage class, where we happen to read uint16_t out of a char array,
memory accesses might not be aligned. In that case, we rebuild the
uint16_t manually out of two bytes.
2018-04-18 10:04:18 +02:00
Romain Goyet
c4330ae7b1 Use <span> instead of <a> for the keys
Indeed, a keypress on the Enter key submits the last active links,
resulting in double inputs.
2018-04-18 10:04:18 +02:00
Léa Saviot
65744cb9f4 [ion] Fix SRAM end address.
Change-Id: If4fbadd42ffbc8868112f1f2b7cfb97266cbf974
2018-04-16 10:48:11 +02:00
Léa Saviot
ee6997a07d [usb] Implement jumpReset in assembly.
This avoids unwanted stack modifications emited by the compiler.

Change-Id: I2a2a13ee5395b95ed676f6634be86eeb148d55fd
2018-04-16 10:48:11 +02:00
Léa Saviot
f1849cf17e [usb] Invalid data and instruction caches after locking Flash
Change-Id: I154ef581a640b41c7f9815e0aae7035f7bbefe8a
2018-04-16 10:48:11 +02:00
Léa Saviot
e846e31029 [usb] Clear interrupt on "false" ENUMDNE
Fixes a bug where the device would not get enumerated even if the plug
state was detected (an ENUMDNE interrupt had not been cleared, thus the
new enumeration attempt was not detected).

Change-Id: I19622221fc077965ed3cab5322944e4c2c89fde4
2018-04-16 10:48:11 +02:00
Léa Saviot
37a699f1ab [usb] Clearer USBEnumeration event detection.
Change-Id: I5c15f7cda6fc7132392423ef34beed135b9981ab
2018-04-16 10:48:11 +02:00
Léa Saviot
d2f551a818 [usb] Add waiting before writing on the FLASH.CR register
Change-Id: Ie3dcbe14e031b7149f31c145cf69773b1ece5c26
2018-04-16 10:48:11 +02:00
Émilie Feral
d9de44a28f Merge branch 'master' of ssh://git.numworks.com/Epsilon 2018-04-11 16:11:15 +02:00
Émilie Feral
934e8feca5 [emscripten] Handle None event from SDL 2018-04-11 16:07:46 +02:00
Léa Saviot
d87e71d847 [usb] Use proper function to scan registers.
Change-Id: I37f0f8ce105c7791fa8890013d672cca7dff4126
2018-04-11 15:40:41 +02:00
Léa Saviot
555ced4941 [usb] If needed, reset the device inside Calculator::Poll
Change-Id: I2d9e2eef4e04b1042a2524a4267569324ad8bcce
2018-04-11 15:40:41 +02:00
Romain Goyet
1b8123e66a [ion] Error-out on any global variable that needs a constructor 2018-04-10 15:09:30 +02:00
Romain Goyet
628992680b [ion] Ion::Storage is not a global variable anymore 2018-04-10 15:09:30 +02:00
Romain Goyet
c090e2aa13 [ion] Remove useless macros 2018-04-10 15:09:30 +02:00
Romain Goyet
e072630437 [ion] Get rid of FORCE_LINK 2018-04-10 15:09:30 +02:00
Léa Saviot
b7fd109f93 [ion] Fix hexNumber().
Change-Id: Ic12e3f17ec5e6508613034c4b259eee2fd103be4
2018-04-10 10:17:21 +02:00
Léa Saviot
0e578fa0e6 [ion] Fix Ion::getSerialNumber for simulator.
Change-Id: Id6a616695bc43718751a3e3861d0410aa0b35416
2018-04-09 16:30:51 +02:00
Léa Saviot
0419713de0 [ion/usb] Remove Ion::USB::removeSoftDisconnect()
Change-Id: I02268dc52aefa9d9d90ed559757f005af49f4732
2018-04-09 15:36:44 +02:00
Léa Saviot
0e977bac00 [ion] Use dummy usb.cpp in simulator.
Change-Id: Id7f0e110a661372702d550883b6d341c1b5915d4
2018-04-09 15:35:50 +02:00
Romain Goyet
256ef9a5c6 [ion] Don't call KDColorYellow which doesn't work on the flasher 2018-04-09 14:04:09 +02:00
Romain Goyet
d0dff5e7fe [ion] The flasher starts on a yellow screen 2018-04-09 13:37:11 +02:00
Romain Goyet
5155957c5a [ion] The bench starts on a white screen 2018-04-09 13:36:54 +02:00
Romain Goyet
4a19c79df8 [ion] Add a Print bench command 2018-04-09 13:36:36 +02:00
Romain Goyet
e543e83766 [usb/flasher] Enable USB before jumping in, correct keyboard logic 2018-04-09 11:57:17 +02:00
Romain Goyet
9aed025abc [usb] Calculator::PollAndReset can ignore the keyboard 2018-04-09 11:04:30 +02:00
Romain Goyet
6c33963e04 [usb] Don't exit from the flasher 2018-04-09 10:57:19 +02:00
Romain Goyet
0e1410932c [usb] Fix the build 2018-04-09 10:55:30 +02:00
Léa Saviot
b807938031 [ion] Add EPSILON_DEVICE_BENCH
Change-Id: I58de053755305fc610c410a139572f2d0eee2a2d
2018-04-09 10:52:32 +02:00
Léa Saviot
1378c77907 [usb] Move usb_dfu_* files into the usb/ subfolder
Change-Id: I1d1e99295adc9b7f44c2d3f0dba4cd8b49dc3b3c
2018-04-09 10:52:16 +02:00
Léa Saviot
68bdb7ff58 [usb] Unlock the flash only if it is locked.
Change-Id: I0cfc34fc158c8babb025b143fc77f4d64440876e
2018-04-09 10:51:07 +02:00
Léa Saviot
fc2c975623 [usb-flasher] Create a standalone DFU .bin.
Change-Id: I34e87b66cc51f4e6f4578c8efc7a510ee08cd138
2018-04-09 10:50:28 +02:00
Léa Saviot
49e1e56abe [ion] Add dummy USB functions
Change-Id: Id67dd947997a2812dd718fdf1ded2f3a2b68ff48
2018-04-06 14:31:49 +02:00
Léa Saviot
f9717a38ce [usb] Lower power consumption.
Change-Id: I3822a6dec193c04ef297bdd47f02f84f61c36094
2018-04-06 14:31:49 +02:00
Léa Saviot
fa0530a5f0 [usb] ShutdownOTG.
Change-Id: Id2fd4d978ce5d273cb4b67b8bb5b3343c7184377
2018-04-06 14:31:49 +02:00
Léa Saviot
b2f9c4c0c9 [usb] Better comments in usb.cpp
Change-Id: I81074c755e2e192a1c82bfabf26ca601a6162bd8
2018-04-06 14:31:49 +02:00
Léa Saviot
61e880935a [usb] Add comment in InterfaceDescriptor
Change-Id: I8e20edd31577b7608a2fd28234787204a0fac7e4
2018-04-06 14:31:49 +02:00
Léa Saviot
6062886ed7 [usb] Better comment for needed alternate interface Descriptor.
Change-Id: Ide46d7ecd1259dc200d491eac309e7b15b5a60e8
2018-04-06 14:31:49 +02:00
Léa Saviot
55c8304689 [usb] Fix bmAttributes of DFUFunctionalDescriptor.
Change-Id: I0d793332a33a4380ad2dec8036d7a52050b91d36
2018-04-06 14:31:49 +02:00
Léa Saviot
4bd0ab3edd [Makefile] Fix verbose.
Change-Id: I629d1b6eac0682d7c7de82f5ba7c90b3ebcfef13
2018-04-06 14:31:49 +02:00
Léa Saviot
cf1907ca5e [ion] Discard un-needed sections in DFU linker script.
Change-Id: I1c1c44675a5c1849dc4270673d305abc82d29c48
2018-04-06 14:31:49 +02:00
Léa Saviot
24dd554aee [usb] Set the bcdDevice to 1.00
Change-Id: I21bc05cc7d9084b3c43c7b19caccc8bb06bbc73b
2018-04-06 14:31:49 +02:00
Léa Saviot
55d56b3927 [usb] Send real serial number in the device descriptor.
Change-Id: Ie64f2a0fb03913600c96986dab8171afaa6bf05b
2018-04-06 14:31:49 +02:00
Léa Saviot
b6b072de3d [usb] Fix missing included file.
Change-Id: I472164ac1eec9e20838421a0311f5e036539a866
2018-04-06 14:31:49 +02:00
Léa Saviot
4839e83f8f [usb] Do actions after a getStatus in wholeDataSentCallback
Change-Id: I4ae896ff56e5388abe851c766f6df81ecd734b47
2018-04-06 14:31:48 +02:00
Léa Saviot
3d9e334f50 [usb] Add wholeDataSentCallback after a Status Out transaction.
Change-Id: I689c33da2a79cab9b5a8693d2eaddc89b3b38820
2018-04-06 14:31:48 +02:00
Léa Saviot
ce23c9eaf3 [usb] Fix "real" download condition.
Change-Id: I80015761f661c1974b31f40f1f1c7d77dbdaf05a
2018-04-06 14:31:48 +02:00
Léa Saviot
23a516d574 [usb] leaveDFUAndReset function.
Change-Id: Ia1844e81d34bdc3509cb18fcdd46551b2dac06ad
2018-04-06 14:31:48 +02:00
Léa Saviot
be8eace83b [usb] Add variable to Device to tell if it should reset on disconnect
Change-Id: I69a960661aea145bce02ba7a103c61deff7caf61
2018-04-06 14:31:48 +02:00