vtcsec_summit
Conor 2016-03-29 00:31:02 -04:00
rodzic 2fe63203aa
commit 8a41d3399c
84 zmienionych plików z 6676 dodań i 6180 usunięć

Wyświetl plik

@ -116,7 +116,6 @@
<option id="com.silabs.ide.si8051.keil.compiler.category.includes.paths.1968864987" name="Include paths (INCDIR(...))" superClass="com.silabs.ide.si8051.keil.compiler.category.includes.paths" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/inc/config}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${ProjDirPath}/inc&quot;"/>
<listOptionValue builtIn="false" value="&quot;${ProjDirPath}/tinyprintf&quot;"/>
<listOptionValue builtIn="false" value="&quot;${ProjDirPath}/tests&quot;"/>
<listOptionValue builtIn="false" value="&quot;${StudioSdkPath}/Device/shared/si8051Base&quot;"/>
<listOptionValue builtIn="false" value="&quot;${StudioSdkPath}/Device/EFM8UB1&quot;"/>
@ -136,8 +135,8 @@
<option id="com.silabs.ide.si8051.keil.assembler.category.includes.paths.158046198" name="Include paths (INCDIR(...))" superClass="com.silabs.ide.si8051.keil.assembler.category.includes.paths" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/inc/config}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${ProjDirPath}/inc&quot;"/>
<listOptionValue builtIn="false" value="&quot;${ProjDirPath}/tinyprintf&quot;"/>
<listOptionValue builtIn="false" value="&quot;${ProjDirPath}/tests&quot;"/>
<listOptionValue builtIn="false" value="&quot;${ProjDirPath}/tinyprintf&quot;"/>
<listOptionValue builtIn="false" value="&quot;${StudioSdkPath}/Device/shared/si8051Base&quot;"/>
<listOptionValue builtIn="false" value="&quot;${StudioSdkPath}/Device/EFM8UB1&quot;"/>
<listOptionValue builtIn="false" value="&quot;${StudioSdkPath}/Device/EFM8UB1/inc&quot;"/>
@ -163,7 +162,7 @@
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
</cconfiguration>
</storageModule>
<storageModule moduleId="com.silabs.ide.project.core" project.generation="17" projectCommon.buildArtifactType="EXE" projectCommon.kitId="com.silabs.kit.si8051.efm8ub1_slstk2000a" projectCommon.partId="com.silabs.mcu.si8051.efm8ub1_g.efm8ub10f16g" projectCommon.sdkId="com.silabs.sdk.si8051.sls:3.0.0"/>
<storageModule moduleId="com.silabs.ide.project.core" project.generation="70" projectCommon.buildArtifactType="EXE" projectCommon.kitId="com.silabs.kit.si8051.efm8ub1_slstk2000a" projectCommon.partId="com.silabs.mcu.si8051.efm8ub1_g.efm8ub10f16g" projectCommon.sdkId="com.silabs.sdk.si8051.sls:3.0.0"/>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<project id="u2f-firmware.com.silabs.ide.project.core.cdt.cdtMbsProjectType.801504117" name="SLS CDT Project" projectType="com.silabs.ide.project.core.cdt.cdtMbsProjectType"/>
</storageModule>

Wyświetl plik

@ -27,6 +27,10 @@ extern void TIMER01_0_enter_DefaultMode_from_RESET(void);
extern void TIMER16_2_enter_DefaultMode_from_RESET(void);
extern void TIMER16_3_enter_DefaultMode_from_RESET(void);
extern void TIMER_SETUP_0_enter_DefaultMode_from_RESET(void);
extern void PCA_0_enter_DefaultMode_from_RESET(void);
extern void PCACH_0_enter_DefaultMode_from_RESET(void);
extern void PCACH_1_enter_DefaultMode_from_RESET(void);
extern void PCACH_2_enter_DefaultMode_from_RESET(void);
extern void SMBUS_0_enter_DefaultMode_from_RESET(void);
extern void UART_0_enter_DefaultMode_from_RESET(void);
extern void INTERRUPT_0_enter_DefaultMode_from_RESET(void);

Wyświetl plik

@ -32,6 +32,7 @@ typedef enum
}
APP_STATE;
typedef enum
{
ERROR_NOTHING = 0,
@ -51,7 +52,7 @@ APP_ERROR_CODE;
struct APP_DATA
{
// must be at least 37 bytes
// must be at least 70 bytes
uint8_t tmp[70];
uint8_t state;
uint8_t error;
@ -79,10 +80,12 @@ extern data struct APP_DATA appdata;
void set_app_u2f_hid_msg(struct u2f_hid_msg * msg );
void set_app_error(APP_ERROR_CODE ec);
void rgb(uint8_t r, uint8_t g, uint8_t b);
// should be called after initializing eeprom
void u2f_init();
#ifdef ATECC_SETUP_DEVICE
void atecc_setup_device(struct config_msg * msg);

Wyświetl plik

@ -25,9 +25,25 @@ extern SI_SEGMENT_VARIABLE(myUsbDevice, USBD_Device_TypeDef, MEM_MODEL_SEG);
SI_SBIT(LED_B, SFR_P0, 6);
SI_SBIT(LED_G, SFR_P0, 7);
SI_SBIT(LED_R, SFR_P1, 0);
SI_SBIT(U2F_BUTTON, SFR_P0, 2);
SI_SBIT(U2F_BUTTON_VAL, SFR_P0, 3);
#define U2F_BUTTON_IS_PRESSED() (U2F_BUTTON == 0)
// Set brightness via PWM
#define LED_B(x)\
PCA0CPL0 = ((((uint8_t)(x))) << PCA0CPL0_PCA0CPL0__SHIFT);\
PCA0CPH0 = ((((uint8_t)(x))) << PCA0CPH0_PCA0CPH0__SHIFT)
#define LED_G(x) \
PCA0CPL1 = ((((uint8_t)(x))) << PCA0CPL1_PCA0CPL1__SHIFT); \
PCA0CPH1 = ((((uint8_t)(x))) << PCA0CPH1_PCA0CPH1__SHIFT)
#define LED_R(x)\
PCA0CPL2 = ((((uint8_t)(x))) << PCA0CPL2_PCA0CPL2__SHIFT);\
PCA0CPH2 = ((((uint8_t)(x))) << PCA0CPH2_PCA0CPH2__SHIFT)
void u2f_delay(int16_t ms);

Wyświetl plik

@ -32,7 +32,7 @@ struct smb_interrupt_interface
};
extern struct smb_interrupt_interface SMB;
extern volatile uint8_t SMB_FLAGS;
extern data volatile uint8_t SMB_FLAGS;
#define SMB_MAX_ERRORS 15
#define SMB_ERRORS_EXCEEDED(inter) ((inter)->errors > SMB_MAX_ERRORS)

Wyświetl plik

@ -1,11 +0,0 @@
################################################################################
# Automatically-generated file. Do not edit!
################################################################################
# Add inputs and outputs from these tool invocations to the build variables
OBJ_UPPER_SRCS += \
../Keil\ 8051\ v9.53\ -\ Release/lib/efm8_assert/assert.OBJ
# Each subdirectory must supply rules for building sources it contributes

Wyświetl plik

@ -1,14 +0,0 @@
################################################################################
# Automatically-generated file. Do not edit!
################################################################################
# Add inputs and outputs from these tool invocations to the build variables
OBJ_UPPER_SRCS += \
../Keil\ 8051\ v9.53\ -\ Release/lib/efm8_usb/src/efm8_usbd.OBJ \
../Keil\ 8051\ v9.53\ -\ Release/lib/efm8_usb/src/efm8_usbdch9.OBJ \
../Keil\ 8051\ v9.53\ -\ Release/lib/efm8_usb/src/efm8_usbdep.OBJ \
../Keil\ 8051\ v9.53\ -\ Release/lib/efm8_usb/src/efm8_usbdint.OBJ
# Each subdirectory must supply rules for building sources it contributes

Wyświetl plik

@ -1,11 +0,0 @@
################################################################################
# Automatically-generated file. Do not edit!
################################################################################
# Add inputs and outputs from these tool invocations to the build variables
OBJ_UPPER_SRCS += \
../Keil\ 8051\ v9.53\ -\ Release/lib/efm8ub1/peripheralDrivers/src/usb_0.OBJ
# Each subdirectory must supply rules for building sources it contributes

Wyświetl plik

@ -1,24 +0,0 @@
################################################################################
# Automatically-generated file. Do not edit!
################################################################################
# Add inputs and outputs from these tool invocations to the build variables
OBJ_UPPER_SRCS += \
../Keil\ 8051\ v9.53\ -\ Release/src/InitDevice.OBJ \
../Keil\ 8051\ v9.53\ -\ Release/src/Interrupts.OBJ \
../Keil\ 8051\ v9.53\ -\ Release/src/SILABS_STARTUP.OBJ \
../Keil\ 8051\ v9.53\ -\ Release/src/atecc508a.OBJ \
../Keil\ 8051\ v9.53\ -\ Release/src/bsp.OBJ \
../Keil\ 8051\ v9.53\ -\ Release/src/callback.OBJ \
../Keil\ 8051\ v9.53\ -\ Release/src/descriptors.OBJ \
../Keil\ 8051\ v9.53\ -\ Release/src/eeprom.OBJ \
../Keil\ 8051\ v9.53\ -\ Release/src/i2c.OBJ \
../Keil\ 8051\ v9.53\ -\ Release/src/idle.OBJ \
../Keil\ 8051\ v9.53\ -\ Release/src/main.OBJ \
../Keil\ 8051\ v9.53\ -\ Release/src/u2f-atecc.OBJ \
../Keil\ 8051\ v9.53\ -\ Release/src/u2f.OBJ \
../Keil\ 8051\ v9.53\ -\ Release/src/u2f_hid.OBJ
# Each subdirectory must supply rules for building sources it contributes

Wyświetl plik

@ -1,11 +0,0 @@
################################################################################
# Automatically-generated file. Do not edit!
################################################################################
# Add inputs and outputs from these tool invocations to the build variables
OBJ_UPPER_SRCS += \
../Keil\ 8051\ v9.53\ -\ Release/tests/tests.OBJ
# Each subdirectory must supply rules for building sources it contributes

Plik binarny nie jest wyświetlany.

Wyświetl plik

@ -1 +1 @@
"/home/pp/apps/u2f-zero/firmware/lib/efm8_assert/assert.c" OMF2 LARGE DEBUG OBJECTEXTEND ROM(LARGE) WARNINGLEVEL (2) FLOATFUZZY(3) OPTIMIZE(9,SIZE) INTVECTOR(0x0000) INTPROMOTE INCDIR(/home/pp/apps/u2f-zero/firmware/inc/config;/home/pp/apps/u2f-zero/firmware/inc;/home/pp/apps/u2f-zero/firmware/tinyprintf;/home/pp/apps/u2f-zero/firmware/tests;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/shared/si8051Base;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_usb/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/peripheral_driver/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_assert) REGFILE (u2f-firmware.ORC) PRINT(.\lib/efm8_assert/assert.lst) COND PAGEWIDTH (120) PAGELENGTH (65) OBJECT(.\lib/efm8_assert/assert.OBJ)
"/home/pp/apps/u2f-zero/firmware/lib/efm8_assert/assert.c" OMF2 LARGE DEBUG OBJECTEXTEND ROM(LARGE) WARNINGLEVEL (2) FLOATFUZZY(3) OPTIMIZE(9,SIZE) INTVECTOR(0x0000) INTPROMOTE INCDIR(/home/pp/apps/u2f-zero/firmware/inc/config;/home/pp/apps/u2f-zero/firmware/inc;/home/pp/apps/u2f-zero/firmware/tests;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/shared/si8051Base;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_usb/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/peripheral_driver/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_assert) REGFILE (u2f-firmware.ORC) PRINT(.\lib/efm8_assert/assert.lst) COND PAGEWIDTH (120) PAGELENGTH (65) OBJECT(.\lib/efm8_assert/assert.OBJ)

Wyświetl plik

@ -1,4 +1,4 @@
C51 COMPILER V9.53.0.0 ASSERT 03/28/2016 20:17:26 PAGE 1
C51 COMPILER V9.53.0.0 ASSERT 03/29/2016 00:06:40 PAGE 1
C51 COMPILER V9.53.0.0, COMPILATION OF MODULE ASSERT
@ -6,12 +6,12 @@ OBJECT MODULE PLACED IN .\lib/efm8_assert/assert.OBJ
COMPILER INVOKED BY: Z:\home\pp\SimplicityStudio_v3\developer\toolchains\keil_8051\9.53\BIN\C51.exe /home/pp/apps/u2f-ze
-ro/firmware/lib/efm8_assert/assert.c OMF2 LARGE DEBUG OBJECTEXTEND ROM(LARGE) WARNINGLEVEL(2) FLOATFUZZY(3) OPTIMIZE(9,S
-IZE) INTVECTOR(0X0000) INTPROMOTE INCDIR(/home/pp/apps/u2f-zero/firmware/inc/config;/home/pp/apps/u2f-zero/firmware/inc;
-/home/pp/apps/u2f-zero/firmware/tinyprintf;/home/pp/apps/u2f-zero/firmware/tests;/home/pp/SimplicityStudio_v3/developer/
-sdks/si8051/v3//Device/shared/si8051Base;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1;/home/pp/
-SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//
-Lib/efm8_usb/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/peripheral_driver/inc;/home/pp/Si
-mplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_assert) REGFILE(u2f-firmware.ORC) PRINT(.\lib/efm8_assert/assert.ls
-t) COND PAGEWIDTH(120) PAGELENGTH(65) OBJECT(.\lib/efm8_assert/assert.OBJ)
-/home/pp/apps/u2f-zero/firmware/tests;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/shared/si8051Base;/h
-ome/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v
-3//Device/EFM8UB1/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_usb/inc;/home/pp/SimplicityStudio_
-v3/developer/sdks/si8051/v3//Device/EFM8UB1/peripheral_driver/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/
-/Lib/efm8_assert) REGFILE(u2f-firmware.ORC) PRINT(.\lib/efm8_assert/assert.lst) COND PAGEWIDTH(120) PAGELENGTH(65) OBJEC
-T(.\lib/efm8_assert/assert.OBJ)
line level source

Plik binarny nie jest wyświetlany.

Wyświetl plik

@ -1 +1 @@
"/home/pp/apps/u2f-zero/firmware/lib/efm8_usb/src/efm8_usbd.c" OMF2 LARGE DEBUG OBJECTEXTEND ROM(LARGE) WARNINGLEVEL (2) FLOATFUZZY(3) OPTIMIZE(9,SIZE) INTVECTOR(0x0000) INTPROMOTE INCDIR(/home/pp/apps/u2f-zero/firmware/inc/config;/home/pp/apps/u2f-zero/firmware/inc;/home/pp/apps/u2f-zero/firmware/tinyprintf;/home/pp/apps/u2f-zero/firmware/tests;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/shared/si8051Base;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_usb/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/peripheral_driver/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_assert) REGFILE (u2f-firmware.ORC) PRINT(.\lib/efm8_usb/src/efm8_usbd.lst) COND PAGEWIDTH (120) PAGELENGTH (65) OBJECT(.\lib/efm8_usb/src/efm8_usbd.OBJ)
"/home/pp/apps/u2f-zero/firmware/lib/efm8_usb/src/efm8_usbd.c" OMF2 LARGE DEBUG OBJECTEXTEND ROM(LARGE) WARNINGLEVEL (2) FLOATFUZZY(3) OPTIMIZE(9,SIZE) INTVECTOR(0x0000) INTPROMOTE INCDIR(/home/pp/apps/u2f-zero/firmware/inc/config;/home/pp/apps/u2f-zero/firmware/inc;/home/pp/apps/u2f-zero/firmware/tests;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/shared/si8051Base;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_usb/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/peripheral_driver/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_assert) REGFILE (u2f-firmware.ORC) PRINT(.\lib/efm8_usb/src/efm8_usbd.lst) COND PAGEWIDTH (120) PAGELENGTH (65) OBJECT(.\lib/efm8_usb/src/efm8_usbd.OBJ)

Wyświetl plik

@ -1,4 +1,4 @@
C51 COMPILER V9.53.0.0 EFM8_USBD 03/28/2016 20:17:26 PAGE 1
C51 COMPILER V9.53.0.0 EFM8_USBD 03/29/2016 00:06:40 PAGE 1
C51 COMPILER V9.53.0.0, COMPILATION OF MODULE EFM8_USBD
@ -6,12 +6,12 @@ OBJECT MODULE PLACED IN .\lib/efm8_usb/src/efm8_usbd.OBJ
COMPILER INVOKED BY: Z:\home\pp\SimplicityStudio_v3\developer\toolchains\keil_8051\9.53\BIN\C51.exe /home/pp/apps/u2f-ze
-ro/firmware/lib/efm8_usb/src/efm8_usbd.c OMF2 LARGE DEBUG OBJECTEXTEND ROM(LARGE) WARNINGLEVEL(2) FLOATFUZZY(3) OPTIMIZE
-(9,SIZE) INTVECTOR(0X0000) INTPROMOTE INCDIR(/home/pp/apps/u2f-zero/firmware/inc/config;/home/pp/apps/u2f-zero/firmware/
-inc;/home/pp/apps/u2f-zero/firmware/tinyprintf;/home/pp/apps/u2f-zero/firmware/tests;/home/pp/SimplicityStudio_v3/develo
-per/sdks/si8051/v3//Device/shared/si8051Base;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1;/home
-/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/
-v3//Lib/efm8_usb/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/peripheral_driver/inc;/home/p
-p/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_assert) REGFILE(u2f-firmware.ORC) PRINT(.\lib/efm8_usb/src/efm8
-_usbd.lst) COND PAGEWIDTH(120) PAGELENGTH(65) OBJECT(.\lib/efm8_usb/src/efm8_usbd.OBJ)
-inc;/home/pp/apps/u2f-zero/firmware/tests;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/shared/si8051Bas
-e;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1;/home/pp/SimplicityStudio_v3/developer/sdks/si80
-51/v3//Device/EFM8UB1/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_usb/inc;/home/pp/SimplicityStu
-dio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/peripheral_driver/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051
-/v3//Lib/efm8_assert) REGFILE(u2f-firmware.ORC) PRINT(.\lib/efm8_usb/src/efm8_usbd.lst) COND PAGEWIDTH(120) PAGELENGTH(6
-5) OBJECT(.\lib/efm8_usb/src/efm8_usbd.OBJ)
line level source
@ -63,7 +63,7 @@ line level source
46 // USB API Functions
47
48 void USBD_AbortAllTransfers(void)
C51 COMPILER V9.53.0.0 EFM8_USBD 03/28/2016 20:17:26 PAGE 2
C51 COMPILER V9.53.0.0 EFM8_USBD 03/29/2016 00:06:40 PAGE 2
49 {
50 1 uint8_t i;
@ -128,7 +128,7 @@ line level source
109 4 break;
110 4 #endif
111 4 #if SLAB_USB_EP2OUT_USED
C51 COMPILER V9.53.0.0 EFM8_USBD 03/28/2016 20:17:26 PAGE 3
C51 COMPILER V9.53.0.0 EFM8_USBD 03/29/2016 00:06:40 PAGE 3
case EP2OUT:
USB_AbortOutEp(2);
@ -193,7 +193,7 @@ line level source
172 USBD_State_TypeDef USBD_GetUsbState(void)
173 {
174 1 return myUsbDevice.state;
C51 COMPILER V9.53.0.0 EFM8_USBD 03/28/2016 20:17:26 PAGE 4
C51 COMPILER V9.53.0.0 EFM8_USBD 03/29/2016 00:06:40 PAGE 4
175 1 }
176
@ -258,7 +258,7 @@ line level source
#endif
236 1
237 1 // Only enable USB interrupts when not in polled mode
C51 COMPILER V9.53.0.0 EFM8_USBD 03/28/2016 20:17:26 PAGE 5
C51 COMPILER V9.53.0.0 EFM8_USBD 03/29/2016 00:06:40 PAGE 5
238 1 #if (SLAB_USB_POLLED_MODE == 0)
239 1 USB_EnableInts();
@ -323,7 +323,7 @@ line level source
298 2 if (ep->state == D_EP_STALL)
299 2 {
300 3 return USB_STATUS_EP_STALLED;
C51 COMPILER V9.53.0.0 EFM8_USBD 03/28/2016 20:17:26 PAGE 6
C51 COMPILER V9.53.0.0 EFM8_USBD 03/29/2016 00:06:40 PAGE 6
301 3 }
302 2 else
@ -388,7 +388,7 @@ line level source
361 1 USB_SaveSfrPage();
362 1
363 1 // Verify the endpoint address is valid and not Endpoint 0.
C51 COMPILER V9.53.0.0 EFM8_USBD 03/28/2016 20:17:26 PAGE 7
C51 COMPILER V9.53.0.0 EFM8_USBD 03/29/2016 00:06:40 PAGE 7
364 1 if ((epAddr == EP0) || (epAddr >= SLAB_USB_NUM_EPS_USED))
365 1 {
@ -453,7 +453,7 @@ line level source
424 1 }
425
426 void USBD_Stop(void)
C51 COMPILER V9.53.0.0 EFM8_USBD 03/28/2016 20:17:26 PAGE 8
C51 COMPILER V9.53.0.0 EFM8_USBD 03/29/2016 00:06:40 PAGE 8
427 {
428 1 USB_DisableInts();
@ -518,7 +518,7 @@ line level source
487 3 #if SLAB_USB_REMOTE_WAKEUP_ENABLED
// If remote wakeup is enabled, query the application if the remote
// wakeup event occurred. If so, exit USBD_Suspend().
C51 COMPILER V9.53.0.0 EFM8_USBD 03/28/2016 20:17:26 PAGE 9
C51 COMPILER V9.53.0.0 EFM8_USBD 03/29/2016 00:06:40 PAGE 9
if (USB_IsSuspended() == true)
{
@ -583,7 +583,7 @@ line level source
550 3 #if SLAB_USB_EP1IN_USED
551 3 case (EP1IN):
552 3 myUsbDevice.ep1in.state = D_EP_IDLE;
C51 COMPILER V9.53.0.0 EFM8_USBD 03/28/2016 20:17:26 PAGE 10
C51 COMPILER V9.53.0.0 EFM8_USBD 03/29/2016 00:06:40 PAGE 10
553 3 USB_SetIndex(1);
554 3 USB_EpnInEndStall();
@ -648,7 +648,7 @@ line level source
613 1 {
614 2 case EP0:
615 2 #if SLAB_USB_EP1IN_USED
C51 COMPILER V9.53.0.0 EFM8_USBD 03/28/2016 20:17:26 PAGE 11
C51 COMPILER V9.53.0.0 EFM8_USBD 03/29/2016 00:06:40 PAGE 11
616 2 case EP1IN:
617 2 #endif
@ -713,7 +713,7 @@ line level source
676 2
677 2 // For data endpoints, we will call USB_WriteFIFO here to reduce latency
678 2 // between the call to USBD_Write() and the first packet being sent.
C51 COMPILER V9.53.0.0 EFM8_USBD 03/28/2016 20:17:26 PAGE 12
C51 COMPILER V9.53.0.0 EFM8_USBD 03/29/2016 00:06:40 PAGE 12
679 2 #if SLAB_USB_EP1IN_USED
680 2 case (EP1IN):
@ -778,7 +778,7 @@ line level source
735 2 #if (SLAB_USB_SUPPORT_ALT_INTERFACES)
for (i = 0; i < SLAB_USB_NUM_INTERFACES; i++)
{
C51 COMPILER V9.53.0.0 EFM8_USBD 03/28/2016 20:17:26 PAGE 13
C51 COMPILER V9.53.0.0 EFM8_USBD 03/29/2016 00:06:40 PAGE 13
myUsbDevice.interfaceAltSetting[i] = 0;
}

Plik binarny nie jest wyświetlany.

Wyświetl plik

@ -1 +1 @@
"/home/pp/apps/u2f-zero/firmware/lib/efm8_usb/src/efm8_usbdch9.c" OMF2 LARGE DEBUG OBJECTEXTEND ROM(LARGE) WARNINGLEVEL (2) FLOATFUZZY(3) OPTIMIZE(9,SIZE) INTVECTOR(0x0000) INTPROMOTE INCDIR(/home/pp/apps/u2f-zero/firmware/inc/config;/home/pp/apps/u2f-zero/firmware/inc;/home/pp/apps/u2f-zero/firmware/tinyprintf;/home/pp/apps/u2f-zero/firmware/tests;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/shared/si8051Base;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_usb/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/peripheral_driver/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_assert) REGFILE (u2f-firmware.ORC) PRINT(.\lib/efm8_usb/src/efm8_usbdch9.lst) COND PAGEWIDTH (120) PAGELENGTH (65) OBJECT(.\lib/efm8_usb/src/efm8_usbdch9.OBJ)
"/home/pp/apps/u2f-zero/firmware/lib/efm8_usb/src/efm8_usbdch9.c" OMF2 LARGE DEBUG OBJECTEXTEND ROM(LARGE) WARNINGLEVEL (2) FLOATFUZZY(3) OPTIMIZE(9,SIZE) INTVECTOR(0x0000) INTPROMOTE INCDIR(/home/pp/apps/u2f-zero/firmware/inc/config;/home/pp/apps/u2f-zero/firmware/inc;/home/pp/apps/u2f-zero/firmware/tests;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/shared/si8051Base;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_usb/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/peripheral_driver/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_assert) REGFILE (u2f-firmware.ORC) PRINT(.\lib/efm8_usb/src/efm8_usbdch9.lst) COND PAGEWIDTH (120) PAGELENGTH (65) OBJECT(.\lib/efm8_usb/src/efm8_usbdch9.OBJ)

Wyświetl plik

@ -1,4 +1,4 @@
C51 COMPILER V9.53.0.0 EFM8_USBDCH9 03/28/2016 20:17:26 PAGE 1
C51 COMPILER V9.53.0.0 EFM8_USBDCH9 03/29/2016 00:06:40 PAGE 1
C51 COMPILER V9.53.0.0, COMPILATION OF MODULE EFM8_USBDCH9
@ -6,12 +6,12 @@ OBJECT MODULE PLACED IN .\lib/efm8_usb/src/efm8_usbdch9.OBJ
COMPILER INVOKED BY: Z:\home\pp\SimplicityStudio_v3\developer\toolchains\keil_8051\9.53\BIN\C51.exe /home/pp/apps/u2f-ze
-ro/firmware/lib/efm8_usb/src/efm8_usbdch9.c OMF2 LARGE DEBUG OBJECTEXTEND ROM(LARGE) WARNINGLEVEL(2) FLOATFUZZY(3) OPTIM
-IZE(9,SIZE) INTVECTOR(0X0000) INTPROMOTE INCDIR(/home/pp/apps/u2f-zero/firmware/inc/config;/home/pp/apps/u2f-zero/firmwa
-re/inc;/home/pp/apps/u2f-zero/firmware/tinyprintf;/home/pp/apps/u2f-zero/firmware/tests;/home/pp/SimplicityStudio_v3/dev
-eloper/sdks/si8051/v3//Device/shared/si8051Base;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1;/h
-ome/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si80
-51/v3//Lib/efm8_usb/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/peripheral_driver/inc;/hom
-e/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_assert) REGFILE(u2f-firmware.ORC) PRINT(.\lib/efm8_usb/src/e
-fm8_usbdch9.lst) COND PAGEWIDTH(120) PAGELENGTH(65) OBJECT(.\lib/efm8_usb/src/efm8_usbdch9.OBJ)
-re/inc;/home/pp/apps/u2f-zero/firmware/tests;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/shared/si8051
-Base;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1;/home/pp/SimplicityStudio_v3/developer/sdks/s
-i8051/v3//Device/EFM8UB1/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_usb/inc;/home/pp/Simplicity
-Studio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/peripheral_driver/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8
-051/v3//Lib/efm8_assert) REGFILE(u2f-firmware.ORC) PRINT(.\lib/efm8_usb/src/efm8_usbdch9.lst) COND PAGEWIDTH(120) PAGELE
-NGTH(65) OBJECT(.\lib/efm8_usb/src/efm8_usbdch9.OBJ)
line level source
@ -63,7 +63,7 @@ line level source
46 * stored in @ref myUsbDevice.setup.
47 ******************************************************************************/
48 USB_Status_TypeDef USBDCH9_SetupCmd(void)
C51 COMPILER V9.53.0.0 EFM8_USBDCH9 03/28/2016 20:17:26 PAGE 2
C51 COMPILER V9.53.0.0 EFM8_USBDCH9 03/29/2016 00:06:40 PAGE 2
49 {
50 1 USB_Status_TypeDef status = USB_STATUS_OK;
@ -128,7 +128,7 @@ line level source
109 * @details Supports CLEAR_FEATURE for Remote Wakeup and Endpoint Halt
110 * @return Status of request (type @ref USB_Status_TypeDef)
111 * @note This function takes no parameters, but it uses the setup command
C51 COMPILER V9.53.0.0 EFM8_USBDCH9 03/28/2016 20:17:26 PAGE 3
C51 COMPILER V9.53.0.0 EFM8_USBDCH9 03/29/2016 00:06:40 PAGE 3
112 * stored in @ref myUsbDevice.setup.
113 ******************************************************************************/
@ -193,7 +193,7 @@ line level source
172 6 #endif
173 6 #if SLAB_USB_EP2OUT_USED
case (USB_EP_DIR_OUT | 2):
C51 COMPILER V9.53.0.0 EFM8_USBDCH9 03/28/2016 20:17:26 PAGE 4
C51 COMPILER V9.53.0.0 EFM8_USBDCH9 03/29/2016 00:06:40 PAGE 4
if (myUsbDevice.ep2out.state != D_EP_RECEIVING)
{
@ -258,7 +258,7 @@ line level source
235 1 && (myUsbDevice.setup.wLength == 1)
236 1 && (myUsbDevice.setup.bmRequestType.Direction == USB_SETUP_DIR_IN)
237 1 && (myUsbDevice.setup.bmRequestType.Recipient == USB_SETUP_RECIPIENT_DEVICE))
C51 COMPILER V9.53.0.0 EFM8_USBDCH9 03/28/2016 20:17:26 PAGE 5
C51 COMPILER V9.53.0.0 EFM8_USBDCH9 03/29/2016 00:06:40 PAGE 5
238 1 {
239 2 if (myUsbDevice.state == USBD_STATE_ADDRESSED)
@ -323,7 +323,7 @@ line level source
298 3 case USB_STRING_DESCRIPTOR:
299 3 #if (SLAB_USB_NUM_LANGUAGES == 1)
300 3
C51 COMPILER V9.53.0.0 EFM8_USBDCH9 03/28/2016 20:17:26 PAGE 6
C51 COMPILER V9.53.0.0 EFM8_USBDCH9 03/29/2016 00:06:40 PAGE 6
301 3 dat = (uint8_t *)myUsbDevice.stringDescriptors[index];
302 3
@ -388,7 +388,7 @@ line level source
}
}
#endif // ( SLAB_USB_NUM_LANGUAGES == 1 )
C51 COMPILER V9.53.0.0 EFM8_USBDCH9 03/28/2016 20:17:26 PAGE 7
C51 COMPILER V9.53.0.0 EFM8_USBDCH9 03/29/2016 00:06:40 PAGE 7
364 3 }
365 2
@ -453,7 +453,7 @@ line level source
424 static USB_Status_TypeDef GetStatus(void)
425 {
426 1 USB_Status_TypeDef retVal = USB_STATUS_REQ_ERR;
C51 COMPILER V9.53.0.0 EFM8_USBDCH9 03/28/2016 20:17:26 PAGE 8
C51 COMPILER V9.53.0.0 EFM8_USBDCH9 03/29/2016 00:06:40 PAGE 8
427 1
428 1 if ((myUsbDevice.setup.wLength == 2)
@ -518,7 +518,7 @@ line level source
487 6 }
488 5 retVal = USB_STATUS_OK;
489 5 break;
C51 COMPILER V9.53.0.0 EFM8_USBDCH9 03/28/2016 20:17:26 PAGE 9
C51 COMPILER V9.53.0.0 EFM8_USBDCH9 03/29/2016 00:06:40 PAGE 9
490 5 #endif
491 5 #if SLAB_USB_EP2OUT_USED
@ -583,7 +583,7 @@ line level source
550
551 /***************************************************************************//**
552 * @brief Sets the Address
C51 COMPILER V9.53.0.0 EFM8_USBDCH9 03/28/2016 20:17:26 PAGE 10
C51 COMPILER V9.53.0.0 EFM8_USBDCH9 03/29/2016 00:06:40 PAGE 10
553 * @return Status of request (type @ref USB_Status_TypeDef)
554 * @note This function takes no parameters, but it uses the setup command
@ -648,7 +648,7 @@ line level source
613 2 // was sent, enter the Configured state.
614 2 if (myUsbDevice.state == USBD_STATE_ADDRESSED)
615 2 {
C51 COMPILER V9.53.0.0 EFM8_USBDCH9 03/28/2016 20:17:26 PAGE 11
C51 COMPILER V9.53.0.0 EFM8_USBDCH9 03/29/2016 00:06:40 PAGE 11
616 3 if ((myUsbDevice.setup.wValue == 0)
617 3 || (myUsbDevice.setup.wValue == myUsbDevice.configDescriptor->bConfigurationValue))
@ -713,7 +713,7 @@ line level source
}
break;
#endif // SLAB_USB_REMOTE_WAKEUP_ENABLED
C51 COMPILER V9.53.0.0 EFM8_USBDCH9 03/28/2016 20:17:26 PAGE 12
C51 COMPILER V9.53.0.0 EFM8_USBDCH9 03/29/2016 00:06:40 PAGE 12
679 3 case USB_SETUP_RECIPIENT_ENDPOINT:
680 3 // Device does not support halting endpoint 0, but do not return
@ -778,7 +778,7 @@ line level source
break;
#endif
741 5 }
C51 COMPILER V9.53.0.0 EFM8_USBDCH9 03/28/2016 20:17:26 PAGE 13
C51 COMPILER V9.53.0.0 EFM8_USBDCH9 03/29/2016 00:06:40 PAGE 13
742 4 }
743 3 }
@ -843,7 +843,7 @@ line level source
802 2 #endif
803 2 #if SLAB_USB_EP2IN_USED
myUsbDevice.ep2in.state = D_EP_IDLE;
C51 COMPILER V9.53.0.0 EFM8_USBDCH9 03/28/2016 20:17:26 PAGE 14
C51 COMPILER V9.53.0.0 EFM8_USBDCH9 03/29/2016 00:06:40 PAGE 14
#endif
806 2 #if SLAB_USB_EP3IN_USED
@ -908,7 +908,7 @@ line level source
865 * @brief Sets up an Endpoint 0 Write
866 * @param dat
867 * Data to transmit on Endpoint 0
C51 COMPILER V9.53.0.0 EFM8_USBDCH9 03/28/2016 20:17:26 PAGE 15
C51 COMPILER V9.53.0.0 EFM8_USBDCH9 03/29/2016 00:06:40 PAGE 15
868 * @param numBytes
869 * Number of bytes to transmit on Endpoint 0

Plik binarny nie jest wyświetlany.

Wyświetl plik

@ -1 +1 @@
"/home/pp/apps/u2f-zero/firmware/lib/efm8_usb/src/efm8_usbdep.c" OMF2 LARGE DEBUG OBJECTEXTEND ROM(LARGE) WARNINGLEVEL (2) FLOATFUZZY(3) OPTIMIZE(9,SIZE) INTVECTOR(0x0000) INTPROMOTE INCDIR(/home/pp/apps/u2f-zero/firmware/inc/config;/home/pp/apps/u2f-zero/firmware/inc;/home/pp/apps/u2f-zero/firmware/tinyprintf;/home/pp/apps/u2f-zero/firmware/tests;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/shared/si8051Base;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_usb/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/peripheral_driver/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_assert) REGFILE (u2f-firmware.ORC) PRINT(.\lib/efm8_usb/src/efm8_usbdep.lst) COND PAGEWIDTH (120) PAGELENGTH (65) OBJECT(.\lib/efm8_usb/src/efm8_usbdep.OBJ)
"/home/pp/apps/u2f-zero/firmware/lib/efm8_usb/src/efm8_usbdep.c" OMF2 LARGE DEBUG OBJECTEXTEND ROM(LARGE) WARNINGLEVEL (2) FLOATFUZZY(3) OPTIMIZE(9,SIZE) INTVECTOR(0x0000) INTPROMOTE INCDIR(/home/pp/apps/u2f-zero/firmware/inc/config;/home/pp/apps/u2f-zero/firmware/inc;/home/pp/apps/u2f-zero/firmware/tests;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/shared/si8051Base;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_usb/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/peripheral_driver/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_assert) REGFILE (u2f-firmware.ORC) PRINT(.\lib/efm8_usb/src/efm8_usbdep.lst) COND PAGEWIDTH (120) PAGELENGTH (65) OBJECT(.\lib/efm8_usb/src/efm8_usbdep.OBJ)

Wyświetl plik

@ -1,4 +1,4 @@
C51 COMPILER V9.53.0.0 EFM8_USBDEP 03/28/2016 20:17:26 PAGE 1
C51 COMPILER V9.53.0.0 EFM8_USBDEP 03/29/2016 00:06:40 PAGE 1
C51 COMPILER V9.53.0.0, COMPILATION OF MODULE EFM8_USBDEP
@ -6,12 +6,12 @@ OBJECT MODULE PLACED IN .\lib/efm8_usb/src/efm8_usbdep.OBJ
COMPILER INVOKED BY: Z:\home\pp\SimplicityStudio_v3\developer\toolchains\keil_8051\9.53\BIN\C51.exe /home/pp/apps/u2f-ze
-ro/firmware/lib/efm8_usb/src/efm8_usbdep.c OMF2 LARGE DEBUG OBJECTEXTEND ROM(LARGE) WARNINGLEVEL(2) FLOATFUZZY(3) OPTIMI
-ZE(9,SIZE) INTVECTOR(0X0000) INTPROMOTE INCDIR(/home/pp/apps/u2f-zero/firmware/inc/config;/home/pp/apps/u2f-zero/firmwar
-e/inc;/home/pp/apps/u2f-zero/firmware/tinyprintf;/home/pp/apps/u2f-zero/firmware/tests;/home/pp/SimplicityStudio_v3/deve
-loper/sdks/si8051/v3//Device/shared/si8051Base;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1;/ho
-me/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si805
-1/v3//Lib/efm8_usb/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/peripheral_driver/inc;/home
-/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_assert) REGFILE(u2f-firmware.ORC) PRINT(.\lib/efm8_usb/src/ef
-m8_usbdep.lst) COND PAGEWIDTH(120) PAGELENGTH(65) OBJECT(.\lib/efm8_usb/src/efm8_usbdep.OBJ)
-e/inc;/home/pp/apps/u2f-zero/firmware/tests;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/shared/si8051B
-ase;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1;/home/pp/SimplicityStudio_v3/developer/sdks/si
-8051/v3//Device/EFM8UB1/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_usb/inc;/home/pp/SimplicityS
-tudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/peripheral_driver/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si80
-51/v3//Lib/efm8_assert) REGFILE(u2f-firmware.ORC) PRINT(.\lib/efm8_usb/src/efm8_usbdep.lst) COND PAGEWIDTH(120) PAGELENG
-TH(65) OBJECT(.\lib/efm8_usb/src/efm8_usbdep.OBJ)
line level source
@ -63,7 +63,7 @@ line level source
38
39 #else
C51 COMPILER V9.53.0.0 EFM8_USBDEP 03/28/2016 20:17:26 PAGE 2
C51 COMPILER V9.53.0.0 EFM8_USBDEP 03/29/2016 00:06:40 PAGE 2
// -------------------------------
// Generic FIFO access functions
@ -128,7 +128,7 @@ line level source
uint8_t numBytesWrite;
// USB_WriteFIFO() accepts a maximum of 255 bytes. If the number of bytes to
C51 COMPILER V9.53.0.0 EFM8_USBDEP 03/28/2016 20:17:26 PAGE 3
C51 COMPILER V9.53.0.0 EFM8_USBDEP 03/29/2016 00:06:40 PAGE 3
// send is greated than 255, call USB_WriteFIFO() multiple times.
while (numBytes > 0)
@ -193,7 +193,7 @@ line level source
162 2 }
163 1 }
164 #endif // SLAB_USB_EP1IN_USED
C51 COMPILER V9.53.0.0 EFM8_USBDEP 03/28/2016 20:17:26 PAGE 4
C51 COMPILER V9.53.0.0 EFM8_USBDEP 03/29/2016 00:06:40 PAGE 4
165
166 #if SLAB_USB_EP2IN_USED
@ -258,7 +258,7 @@ line level source
void handleUsbIn3Int(void)
{
#if SLAB_USB_EP3IN_TRANSFER_TYPE == USB_EPTYPE_ISOC
C51 COMPILER V9.53.0.0 EFM8_USBDEP 03/28/2016 20:17:26 PAGE 5
C51 COMPILER V9.53.0.0 EFM8_USBDEP 03/29/2016 00:06:40 PAGE 5
uint16_t xferred, nextIdx;
#else
@ -323,7 +323,7 @@ line level source
if (callback == true)
{
USBD_XferCompleteCb(EP3IN, USB_STATUS_OK, xferred, myUsbDevice.ep3in.remaining);
C51 COMPILER V9.53.0.0 EFM8_USBDEP 03/28/2016 20:17:26 PAGE 6
C51 COMPILER V9.53.0.0 EFM8_USBDEP 03/29/2016 00:06:40 PAGE 6
}
#elif (SLAB_USB_EP3IN_TRANSFER_TYPE == USB_EPTYPE_ISOC)
@ -388,7 +388,7 @@ line level source
346 3 }
347 2 else
348 2 {
C51 COMPILER V9.53.0.0 EFM8_USBDEP 03/28/2016 20:17:26 PAGE 7
C51 COMPILER V9.53.0.0 EFM8_USBDEP 03/29/2016 00:06:40 PAGE 7
349 3 USB_ReadFIFO(1, count, myUsbDevice.ep1out.buf);
350 3
@ -453,7 +453,7 @@ line level source
status = USB_STATUS_EP_RX_BUFFER_OVERRUN;
}
else
C51 COMPILER V9.53.0.0 EFM8_USBDEP 03/28/2016 20:17:26 PAGE 8
C51 COMPILER V9.53.0.0 EFM8_USBDEP 03/29/2016 00:06:40 PAGE 8
{
USB_ReadFIFO(2, count, myUsbDevice.ep2out.buf);
@ -518,7 +518,7 @@ line level source
{
count = USB_EpOutGetCount();
C51 COMPILER V9.53.0.0 EFM8_USBDEP 03/28/2016 20:17:26 PAGE 9
C51 COMPILER V9.53.0.0 EFM8_USBDEP 03/29/2016 00:06:40 PAGE 9
// If USBD_Read() has not been called, return an error
if (myUsbDevice.ep3out.state != D_EP_RECEIVING)
@ -583,7 +583,7 @@ line level source
}
#if ((SLAB_USB_EP3OUT_TRANSFER_TYPE == USB_EPTYPE_BULK) || (SLAB_USB_EP3OUT_TRANSFER_TYPE == USB_EPTYPE_I
C51 COMPILER V9.53.0.0 EFM8_USBDEP 03/28/2016 20:17:26 PAGE 10
C51 COMPILER V9.53.0.0 EFM8_USBDEP 03/29/2016 00:06:40 PAGE 10
-NTR))
USBD_XferCompleteCb(EP3OUT, status, count, myUsbDevice.ep3out.remaining);
@ -648,7 +648,7 @@ line level source
593 3 #endif
594 3
595 3 default:
C51 COMPILER V9.53.0.0 EFM8_USBDEP 03/28/2016 20:17:26 PAGE 11
C51 COMPILER V9.53.0.0 EFM8_USBDEP 03/29/2016 00:06:40 PAGE 11
596 3 break;
597 3 }
@ -713,7 +713,7 @@ line level source
656 2 #endif
657 2
658 2 case SI_GPTR_MTYPE_CODE:
C51 COMPILER V9.53.0.0 EFM8_USBDEP 03/28/2016 20:17:26 PAGE 12
C51 COMPILER V9.53.0.0 EFM8_USBDEP 03/29/2016 00:06:40 PAGE 12
659 2 USB_WriteFIFO_Code(numBytes, dat);
660 2 break;
@ -778,7 +778,7 @@ line level source
718 1 {
719 2 USB_SetFIFOByte(*dat);
720 2 dat++;
C51 COMPILER V9.53.0.0 EFM8_USBDEP 03/28/2016 20:17:26 PAGE 13
C51 COMPILER V9.53.0.0 EFM8_USBDEP 03/29/2016 00:06:40 PAGE 13
721 2 }
722 1 }
@ -843,7 +843,7 @@ line level source
779 1 }
780
781 /***************************************************************************//**
C51 COMPILER V9.53.0.0 EFM8_USBDEP 03/28/2016 20:17:26 PAGE 14
C51 COMPILER V9.53.0.0 EFM8_USBDEP 03/29/2016 00:06:40 PAGE 14
782 * @brief Writes data held in paged XRAM to the USB FIFO
783 * @details The FIFO to write must be set before calling the function with
@ -908,7 +908,7 @@ line level source
841 * @brief Writes data held in code space to the USB FIFO
842 * @details The FIFO to write must be set before calling the function with
843 * @ref USB_EnableWriteFIFO().
C51 COMPILER V9.53.0.0 EFM8_USBDEP 03/28/2016 20:17:26 PAGE 15
C51 COMPILER V9.53.0.0 EFM8_USBDEP 03/29/2016 00:06:40 PAGE 15
844 * @param numBytes
845 * Number of bytes to write to the FIFO
@ -973,7 +973,7 @@ MODULE INFORMATION: STATIC OVERLAYABLE
DATA SIZE = ---- ----
IDATA SIZE = ---- ----
BIT SIZE = ---- 3
C51 COMPILER V9.53.0.0 EFM8_USBDEP 03/28/2016 20:17:26 PAGE 16
C51 COMPILER V9.53.0.0 EFM8_USBDEP 03/29/2016 00:06:40 PAGE 16
EDATA SIZE = ---- ----
HDATA SIZE = ---- ----

Plik binarny nie jest wyświetlany.

Wyświetl plik

@ -1 +1 @@
"/home/pp/apps/u2f-zero/firmware/lib/efm8_usb/src/efm8_usbdint.c" OMF2 LARGE DEBUG OBJECTEXTEND ROM(LARGE) WARNINGLEVEL (2) FLOATFUZZY(3) OPTIMIZE(9,SIZE) INTVECTOR(0x0000) INTPROMOTE INCDIR(/home/pp/apps/u2f-zero/firmware/inc/config;/home/pp/apps/u2f-zero/firmware/inc;/home/pp/apps/u2f-zero/firmware/tinyprintf;/home/pp/apps/u2f-zero/firmware/tests;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/shared/si8051Base;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_usb/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/peripheral_driver/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_assert) REGFILE (u2f-firmware.ORC) PRINT(.\lib/efm8_usb/src/efm8_usbdint.lst) COND PAGEWIDTH (120) PAGELENGTH (65) OBJECT(.\lib/efm8_usb/src/efm8_usbdint.OBJ)
"/home/pp/apps/u2f-zero/firmware/lib/efm8_usb/src/efm8_usbdint.c" OMF2 LARGE DEBUG OBJECTEXTEND ROM(LARGE) WARNINGLEVEL (2) FLOATFUZZY(3) OPTIMIZE(9,SIZE) INTVECTOR(0x0000) INTPROMOTE INCDIR(/home/pp/apps/u2f-zero/firmware/inc/config;/home/pp/apps/u2f-zero/firmware/inc;/home/pp/apps/u2f-zero/firmware/tests;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/shared/si8051Base;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_usb/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/peripheral_driver/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_assert) REGFILE (u2f-firmware.ORC) PRINT(.\lib/efm8_usb/src/efm8_usbdint.lst) COND PAGEWIDTH (120) PAGELENGTH (65) OBJECT(.\lib/efm8_usb/src/efm8_usbdint.OBJ)

Wyświetl plik

@ -1,4 +1,4 @@
C51 COMPILER V9.53.0.0 EFM8_USBDINT 03/28/2016 20:17:26 PAGE 1
C51 COMPILER V9.53.0.0 EFM8_USBDINT 03/29/2016 00:06:40 PAGE 1
C51 COMPILER V9.53.0.0, COMPILATION OF MODULE EFM8_USBDINT
@ -6,12 +6,12 @@ OBJECT MODULE PLACED IN .\lib/efm8_usb/src/efm8_usbdint.OBJ
COMPILER INVOKED BY: Z:\home\pp\SimplicityStudio_v3\developer\toolchains\keil_8051\9.53\BIN\C51.exe /home/pp/apps/u2f-ze
-ro/firmware/lib/efm8_usb/src/efm8_usbdint.c OMF2 LARGE DEBUG OBJECTEXTEND ROM(LARGE) WARNINGLEVEL(2) FLOATFUZZY(3) OPTIM
-IZE(9,SIZE) INTVECTOR(0X0000) INTPROMOTE INCDIR(/home/pp/apps/u2f-zero/firmware/inc/config;/home/pp/apps/u2f-zero/firmwa
-re/inc;/home/pp/apps/u2f-zero/firmware/tinyprintf;/home/pp/apps/u2f-zero/firmware/tests;/home/pp/SimplicityStudio_v3/dev
-eloper/sdks/si8051/v3//Device/shared/si8051Base;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1;/h
-ome/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si80
-51/v3//Lib/efm8_usb/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/peripheral_driver/inc;/hom
-e/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_assert) REGFILE(u2f-firmware.ORC) PRINT(.\lib/efm8_usb/src/e
-fm8_usbdint.lst) COND PAGEWIDTH(120) PAGELENGTH(65) OBJECT(.\lib/efm8_usb/src/efm8_usbdint.OBJ)
-re/inc;/home/pp/apps/u2f-zero/firmware/tests;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/shared/si8051
-Base;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1;/home/pp/SimplicityStudio_v3/developer/sdks/s
-i8051/v3//Device/EFM8UB1/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_usb/inc;/home/pp/Simplicity
-Studio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/peripheral_driver/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8
-051/v3//Lib/efm8_assert) REGFILE(u2f-firmware.ORC) PRINT(.\lib/efm8_usb/src/efm8_usbdint.lst) COND PAGEWIDTH(120) PAGELE
-NGTH(65) OBJECT(.\lib/efm8_usb/src/efm8_usbdint.OBJ)
line level source
@ -63,7 +63,7 @@ line level source
void handleUsbOut3Int(void);
#endif // SLAB_USB_EP3OUT_USED
48
C51 COMPILER V9.53.0.0 EFM8_USBDINT 03/28/2016 20:17:26 PAGE 2
C51 COMPILER V9.53.0.0 EFM8_USBDINT 03/29/2016 00:06:40 PAGE 2
49 void SendEp0Stall(void);
50
@ -128,7 +128,7 @@ line level source
106 2 {
107 3 USB_SetOut1IntActive(statusOut);
108 3 }
C51 COMPILER V9.53.0.0 EFM8_USBDINT 03/28/2016 20:17:26 PAGE 3
C51 COMPILER V9.53.0.0 EFM8_USBDINT 03/29/2016 00:06:40 PAGE 3
109 2 #endif
110 2 #if SLAB_USB_EP2OUT_USED
@ -193,7 +193,7 @@ line level source
166 1
167 1 #if SLAB_USB_EP2IN_USED
if (USB_IsIn2IntActive(statusIn))
C51 COMPILER V9.53.0.0 EFM8_USBDINT 03/28/2016 20:17:26 PAGE 4
C51 COMPILER V9.53.0.0 EFM8_USBDINT 03/29/2016 00:06:40 PAGE 4
{
handleUsbIn2Int();
@ -258,7 +258,7 @@ line level source
229 3 }
230 2 else if (myUsbDevice.ep0.state == D_EP_IDLE)
231 2 {
C51 COMPILER V9.53.0.0 EFM8_USBDINT 03/28/2016 20:17:26 PAGE 5
C51 COMPILER V9.53.0.0 EFM8_USBDINT 03/29/2016 00:06:40 PAGE 5
232 3 myUsbDevice.ep0String.c = USB_STRING_DESCRIPTOR_UTF16LE;
233 3 USB_ReadFIFOSetup();
@ -323,7 +323,7 @@ line level source
292 1 ptr[2] = le16toh(ptr[2]);
293 1 ptr[3] = le16toh(ptr[3]);
294 1 }
C51 COMPILER V9.53.0.0 EFM8_USBDINT 03/28/2016 20:17:26 PAGE 6
C51 COMPILER V9.53.0.0 EFM8_USBDINT 03/29/2016 00:06:40 PAGE 6
295
296 /***************************************************************************//**
@ -388,7 +388,7 @@ line level source
#endif // (!(SLAB_USB_PWRSAVE_MODE & USB_PWRSAVE_MODE_ONVBUSOFF))
356 1
357 1 #if SLAB_USB_RESET_CB
C51 COMPILER V9.53.0.0 EFM8_USBDINT 03/28/2016 20:17:26 PAGE 7
C51 COMPILER V9.53.0.0 EFM8_USBDINT 03/29/2016 00:06:40 PAGE 7
358 1 // Make the USB Reset Callback
359 1 USBD_ResetCb();
@ -453,7 +453,7 @@ line level source
418 3 USB_WriteFIFO(0, 2, myUsbDevice.ep0.buf, false);
419 3 myUsbDevice.ep0.buf += 2;
420 3 count -= 2;
C51 COMPILER V9.53.0.0 EFM8_USBDINT 03/28/2016 20:17:26 PAGE 8
C51 COMPILER V9.53.0.0 EFM8_USBDINT 03/29/2016 00:06:40 PAGE 8
421 3 myUsbDevice.ep0String.encoding.init = false;
422 3 }
@ -518,7 +518,7 @@ line level source
481 1 if (myUsbDevice.ep0.remaining < count)
482 1 {
483 2 myUsbDevice.ep0.state = D_EP_IDLE;
C51 COMPILER V9.53.0.0 EFM8_USBDINT 03/28/2016 20:17:26 PAGE 9
C51 COMPILER V9.53.0.0 EFM8_USBDINT 03/29/2016 00:06:40 PAGE 9
484 2 myUsbDevice.ep0.misc.bits.outPacketPending = true;
485 2 status = USB_STATUS_EP_RX_BUFFER_OVERRUN;
@ -583,7 +583,7 @@ MODULE INFORMATION: STATIC OVERLAYABLE
EDATA SIZE = ---- ----
HDATA SIZE = ---- ----
XDATA CONST SIZE = ---- ----
C51 COMPILER V9.53.0.0 EFM8_USBDINT 03/28/2016 20:17:26 PAGE 10
C51 COMPILER V9.53.0.0 EFM8_USBDINT 03/29/2016 00:06:40 PAGE 10
FAR CONST SIZE = ---- ----
END OF MODULE INFORMATION.

Wyświetl plik

@ -1 +1 @@
"/home/pp/apps/u2f-zero/firmware/lib/efm8ub1/peripheralDrivers/src/usb_0.c" OMF2 LARGE DEBUG OBJECTEXTEND ROM(LARGE) WARNINGLEVEL (2) FLOATFUZZY(3) OPTIMIZE(9,SIZE) INTVECTOR(0x0000) INTPROMOTE INCDIR(/home/pp/apps/u2f-zero/firmware/inc/config;/home/pp/apps/u2f-zero/firmware/inc;/home/pp/apps/u2f-zero/firmware/tinyprintf;/home/pp/apps/u2f-zero/firmware/tests;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/shared/si8051Base;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_usb/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/peripheral_driver/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_assert) REGFILE (u2f-firmware.ORC) PRINT(.\lib/efm8ub1/peripheralDrivers/src/usb_0.lst) COND PAGEWIDTH (120) PAGELENGTH (65) OBJECT(.\lib/efm8ub1/peripheralDrivers/src/usb_0.OBJ)
"/home/pp/apps/u2f-zero/firmware/lib/efm8ub1/peripheralDrivers/src/usb_0.c" OMF2 LARGE DEBUG OBJECTEXTEND ROM(LARGE) WARNINGLEVEL (2) FLOATFUZZY(3) OPTIMIZE(9,SIZE) INTVECTOR(0x0000) INTPROMOTE INCDIR(/home/pp/apps/u2f-zero/firmware/inc/config;/home/pp/apps/u2f-zero/firmware/inc;/home/pp/apps/u2f-zero/firmware/tests;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/shared/si8051Base;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_usb/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/peripheral_driver/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_assert) REGFILE (u2f-firmware.ORC) PRINT(.\lib/efm8ub1/peripheralDrivers/src/usb_0.lst) COND PAGEWIDTH (120) PAGELENGTH (65) OBJECT(.\lib/efm8ub1/peripheralDrivers/src/usb_0.OBJ)

Wyświetl plik

@ -1,4 +1,4 @@
C51 COMPILER V9.53.0.0 USB_0 03/28/2016 20:17:26 PAGE 1
C51 COMPILER V9.53.0.0 USB_0 03/29/2016 00:06:40 PAGE 1
C51 COMPILER V9.53.0.0, COMPILATION OF MODULE USB_0
@ -6,13 +6,12 @@ OBJECT MODULE PLACED IN .\lib/efm8ub1/peripheralDrivers/src/usb_0.OBJ
COMPILER INVOKED BY: Z:\home\pp\SimplicityStudio_v3\developer\toolchains\keil_8051\9.53\BIN\C51.exe /home/pp/apps/u2f-ze
-ro/firmware/lib/efm8ub1/peripheralDrivers/src/usb_0.c OMF2 LARGE DEBUG OBJECTEXTEND ROM(LARGE) WARNINGLEVEL(2) FLOATFUZZ
-Y(3) OPTIMIZE(9,SIZE) INTVECTOR(0X0000) INTPROMOTE INCDIR(/home/pp/apps/u2f-zero/firmware/inc/config;/home/pp/apps/u2f-z
-ero/firmware/inc;/home/pp/apps/u2f-zero/firmware/tinyprintf;/home/pp/apps/u2f-zero/firmware/tests;/home/pp/SimplicityStu
-dio_v3/developer/sdks/si8051/v3//Device/shared/si8051Base;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/
-EFM8UB1;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/inc;/home/pp/SimplicityStudio_v3/developer
-/sdks/si8051/v3//Lib/efm8_usb/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/peripheral_drive
-r/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_assert) REGFILE(u2f-firmware.ORC) PRINT(.\lib/efm8
-ub1/peripheralDrivers/src/usb_0.lst) COND PAGEWIDTH(120) PAGELENGTH(65) OBJECT(.\lib/efm8ub1/peripheralDrivers/src/usb_0
-.OBJ)
-ero/firmware/inc;/home/pp/apps/u2f-zero/firmware/tests;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/sha
-red/si8051Base;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1;/home/pp/SimplicityStudio_v3/develo
-per/sdks/si8051/v3//Device/EFM8UB1/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_usb/inc;/home/pp/
-SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/peripheral_driver/inc;/home/pp/SimplicityStudio_v3/develope
-r/sdks/si8051/v3//Lib/efm8_assert) REGFILE(u2f-firmware.ORC) PRINT(.\lib/efm8ub1/peripheralDrivers/src/usb_0.lst) COND P
-AGEWIDTH(120) PAGELENGTH(65) OBJECT(.\lib/efm8ub1/peripheralDrivers/src/usb_0.OBJ)
line level source
@ -63,9 +62,9 @@ line level source
45 uint8_t USB_GetCommonInts(void)
46 {
47 1 USB_READ_BYTE(CMINT);
C51 COMPILER V9.53.0.0 USB_0 03/28/2016 20:17:26 PAGE 2
48 1 return USB0DAT;
C51 COMPILER V9.53.0.0 USB_0 03/29/2016 00:06:40 PAGE 2
49 1 }
50
51 uint8_t USB_GetInInts(void)
@ -128,9 +127,9 @@ line level source
108 1 return (bool)(USB0DAT & EINCSRL_STSTL__SET);
109 1 }
110
C51 COMPILER V9.53.0.0 USB_0 03/28/2016 20:17:26 PAGE 3
111 void USB_AbortInEp(uint8_t fifoNum)
C51 COMPILER V9.53.0.0 USB_0 03/29/2016 00:06:40 PAGE 3
112 {
113 1 USB_SetIndex(fifoNum);
114 1 USB_EpnInFlush();
@ -193,9 +192,9 @@ line level source
171 2 if (splitMode == true)
172 2 {
173 3 CSRH_mask |= EINCSRH_SPLIT__ENABLED;
C51 COMPILER V9.53.0.0 USB_0 03/28/2016 20:17:26 PAGE 4
174 3 }
C51 COMPILER V9.53.0.0 USB_0 03/29/2016 00:06:40 PAGE 4
175 2 USB_WRITE_BYTE(EINCSRL, EINCSRL_CLRDT__BMASK);
176 2 USB_WRITE_BYTE(EINCSRH, CSRH_mask);
177 2 }
@ -258,9 +257,9 @@ line level source
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 511 ----
C51 COMPILER V9.53.0.0 USB_0 03/28/2016 20:17:26 PAGE 5
CONSTANT SIZE = ---- ----
C51 COMPILER V9.53.0.0 USB_0 03/29/2016 00:06:40 PAGE 5
XDATA SIZE = ---- ----
PDATA SIZE = ---- ----
DATA SIZE = ---- ----

Plik binarny nie jest wyświetlany.

Wyświetl plik

@ -1 +1 @@
"/home/pp/apps/u2f-zero/firmware/src/InitDevice.c" OMF2 LARGE DEBUG OBJECTEXTEND ROM(LARGE) WARNINGLEVEL (2) FLOATFUZZY(3) OPTIMIZE(9,SIZE) INTVECTOR(0x0000) INTPROMOTE INCDIR(/home/pp/apps/u2f-zero/firmware/inc/config;/home/pp/apps/u2f-zero/firmware/inc;/home/pp/apps/u2f-zero/firmware/tinyprintf;/home/pp/apps/u2f-zero/firmware/tests;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/shared/si8051Base;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_usb/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/peripheral_driver/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_assert) REGFILE (u2f-firmware.ORC) PRINT(.\src/InitDevice.lst) COND PAGEWIDTH (120) PAGELENGTH (65) OBJECT(.\src/InitDevice.OBJ)
"/home/pp/apps/u2f-zero/firmware/src/InitDevice.c" OMF2 LARGE DEBUG OBJECTEXTEND ROM(LARGE) WARNINGLEVEL (2) FLOATFUZZY(3) OPTIMIZE(9,SIZE) INTVECTOR(0x0000) INTPROMOTE INCDIR(/home/pp/apps/u2f-zero/firmware/inc/config;/home/pp/apps/u2f-zero/firmware/inc;/home/pp/apps/u2f-zero/firmware/tests;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/shared/si8051Base;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_usb/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/peripheral_driver/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_assert) REGFILE (u2f-firmware.ORC) PRINT(.\src/InitDevice.lst) COND PAGEWIDTH (120) PAGELENGTH (65) OBJECT(.\src/InitDevice.OBJ)

Plik binarny nie jest wyświetlany.

Wyświetl plik

@ -1 +1 @@
"/home/pp/apps/u2f-zero/firmware/src/Interrupts.c" OMF2 LARGE DEBUG OBJECTEXTEND ROM(LARGE) WARNINGLEVEL (2) FLOATFUZZY(3) OPTIMIZE(9,SIZE) INTVECTOR(0x0000) INTPROMOTE INCDIR(/home/pp/apps/u2f-zero/firmware/inc/config;/home/pp/apps/u2f-zero/firmware/inc;/home/pp/apps/u2f-zero/firmware/tinyprintf;/home/pp/apps/u2f-zero/firmware/tests;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/shared/si8051Base;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_usb/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/peripheral_driver/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_assert) REGFILE (u2f-firmware.ORC) PRINT(.\src/Interrupts.lst) COND PAGEWIDTH (120) PAGELENGTH (65) OBJECT(.\src/Interrupts.OBJ)
"/home/pp/apps/u2f-zero/firmware/src/Interrupts.c" OMF2 LARGE DEBUG OBJECTEXTEND ROM(LARGE) WARNINGLEVEL (2) FLOATFUZZY(3) OPTIMIZE(9,SIZE) INTVECTOR(0x0000) INTPROMOTE INCDIR(/home/pp/apps/u2f-zero/firmware/inc/config;/home/pp/apps/u2f-zero/firmware/inc;/home/pp/apps/u2f-zero/firmware/tests;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/shared/si8051Base;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_usb/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/peripheral_driver/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_assert) REGFILE (u2f-firmware.ORC) PRINT(.\src/Interrupts.lst) COND PAGEWIDTH (120) PAGELENGTH (65) OBJECT(.\src/Interrupts.OBJ)

Wyświetl plik

@ -1,4 +1,4 @@
C51 COMPILER V9.53.0.0 INTERRUPTS 03/28/2016 20:18:25 PAGE 1
C51 COMPILER V9.53.0.0 INTERRUPTS 03/29/2016 00:06:38 PAGE 1
C51 COMPILER V9.53.0.0, COMPILATION OF MODULE INTERRUPTS
@ -6,12 +6,12 @@ OBJECT MODULE PLACED IN .\src/Interrupts.OBJ
COMPILER INVOKED BY: Z:\home\pp\SimplicityStudio_v3\developer\toolchains\keil_8051\9.53\BIN\C51.exe /home/pp/apps/u2f-ze
-ro/firmware/src/Interrupts.c OMF2 LARGE DEBUG OBJECTEXTEND ROM(LARGE) WARNINGLEVEL(2) FLOATFUZZY(3) OPTIMIZE(9,SIZE) INT
-VECTOR(0X0000) INTPROMOTE INCDIR(/home/pp/apps/u2f-zero/firmware/inc/config;/home/pp/apps/u2f-zero/firmware/inc;/home/pp
-/apps/u2f-zero/firmware/tinyprintf;/home/pp/apps/u2f-zero/firmware/tests;/home/pp/SimplicityStudio_v3/developer/sdks/si8
-051/v3//Device/shared/si8051Base;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1;/home/pp/Simplici
-tyStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8
-_usb/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/peripheral_driver/inc;/home/pp/Simplicity
-Studio_v3/developer/sdks/si8051/v3//Lib/efm8_assert) REGFILE(u2f-firmware.ORC) PRINT(.\src/Interrupts.lst) COND PAGEWIDT
-H(120) PAGELENGTH(65) OBJECT(.\src/Interrupts.OBJ)
-/apps/u2f-zero/firmware/tests;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/shared/si8051Base;/home/pp/S
-implicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Devic
-e/EFM8UB1/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_usb/inc;/home/pp/SimplicityStudio_v3/devel
-oper/sdks/si8051/v3//Device/EFM8UB1/peripheral_driver/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm
-8_assert) REGFILE(u2f-firmware.ORC) PRINT(.\src/Interrupts.lst) COND PAGEWIDTH(120) PAGELENGTH(65) OBJECT(.\src/Interrup
-ts.OBJ)
line level source
@ -46,7 +46,7 @@ line level source
29 #define SMB_TX (SMB_WRITE)
30
31 struct smb_interrupt_interface SMB;
32 volatile uint8_t SMB_FLAGS;
32 data volatile uint8_t SMB_FLAGS;
33
34 static void update_from_packet_length()
35 {
@ -63,7 +63,7 @@ line level source
46
47 static void _feed_crc(uint8_t b)
48 {
C51 COMPILER V9.53.0.0 INTERRUPTS 03/28/2016 20:18:25 PAGE 2
C51 COMPILER V9.53.0.0 INTERRUPTS 03/29/2016 00:06:38 PAGE 2
49 1 if (SMB_HAS_CRC())
50 1 {
@ -82,164 +82,161 @@ line level source
63 1 SMB.errors = 0;
64 1 }
65
66 uint8_t count = 0;
67 SI_INTERRUPT (SMBUS0_ISR, SMBUS0_IRQn)
68 {
69 1 uint8_t bus = SMB0CN0 & SMB_STATE_MASK;
70 1 if (SMB0CN0_ARBLOST != 0)
71 1 {
72 2 goto fail;
73 2 }
74 1
75 1 switch (bus)
76 1 {
77 2 case SMB_STATUS_START:
78 2 SMB0DAT = SMB.addr | (SMB_FLAGS & SMB_READ);
79 2 count = 0;
80 2 SMB0CN0_STA = 0;
81 2 break;
82 2
83 2 case SMB_STATUS_MTX:
84 2 count++;
85 2 if (!SMB0CN0_ACK)
86 2 {
87 3 // NACK
88 3 // end transaction
89 3 SMB0CN0_STO = 1;
90 3 SMB_FLAGS |= SMB_RECV_NACK;
91 3 SMB_BUSY_CLEAR();
92 3 }
93 2 else if (!SMB_WRITING())
94 2 {
95 3 // do nothing and switch to receive mode
96 3 }
97 2 else if (SMB.write_offset < SMB.write_len)
98 2 {
99 3 // start writing first buffer
100 3 // dont crc first byte for atecc508a
101 3 if (SMB.write_offset) _feed_crc(SMB.write_buf[SMB.write_offset]);
102 3 SMB0DAT = SMB.write_buf[SMB.write_offset++];
103 3
104 3 }
105 2 else if(SMB_WRITING_EXT() && SMB.write_ext_offset < SMB.write_ext_len)
106 2 {
107 3 // start writing second optional buffer
108 3 _feed_crc(SMB.write_ext_buf[SMB.write_ext_offset]);
109 3 SMB0DAT = SMB.write_ext_buf[SMB.write_ext_offset++];
110 3 }
111 2 else if (SMB_HAS_CRC())
C51 COMPILER V9.53.0.0 INTERRUPTS 03/28/2016 20:18:25 PAGE 3
66 SI_INTERRUPT (SMBUS0_ISR, SMBUS0_IRQn)
67 {
68 1 data uint8_t bus = SMB0CN0 & SMB_STATE_MASK;
69 1 if (SMB0CN0_ARBLOST != 0)
70 1 {
71 2 goto fail;
72 2 }
73 1
74 1 switch (bus)
75 1 {
76 2 case SMB_STATUS_START:
77 2 SMB0DAT = SMB.addr | (SMB_FLAGS & SMB_READ);
78 2 SMB0CN0_STA = 0;
79 2 break;
80 2
81 2 case SMB_STATUS_MTX:
82 2 if (!SMB0CN0_ACK)
83 2 {
84 3 // NACK
85 3 // end transaction
86 3 SMB0CN0_STO = 1;
87 3 SMB_FLAGS |= SMB_RECV_NACK;
88 3 SMB_BUSY_CLEAR();
89 3 }
90 2 else if (!SMB_WRITING())
91 2 {
92 3 // do nothing and switch to receive mode
93 3 }
94 2 else if (SMB.write_offset < SMB.write_len)
95 2 {
96 3 // start writing first buffer
97 3 // dont crc first byte for atecc508a
98 3 if (SMB.write_offset) _feed_crc(SMB.write_buf[SMB.write_offset]);
99 3 SMB0DAT = SMB.write_buf[SMB.write_offset++];
100 3
101 3 }
102 2 else if(SMB_WRITING_EXT() && SMB.write_ext_offset < SMB.write_ext_len)
103 2 {
104 3 // start writing second optional buffer
105 3 _feed_crc(SMB.write_ext_buf[SMB.write_ext_offset]);
106 3 SMB0DAT = SMB.write_ext_buf[SMB.write_ext_offset++];
107 3 }
108 2 else if (SMB_HAS_CRC())
109 2 {
110 3 // write optional CRC
111 3 switch(SMB.crc_offset++)
C51 COMPILER V9.53.0.0 INTERRUPTS 03/29/2016 00:06:38 PAGE 3
112 2 {
113 3 // write optional CRC
114 3 switch(SMB.crc_offset++)
115 3 {
116 4 case 0:
117 4 SMB.crc = reverse_bits(SMB.crc);
118 4 SMB0DAT = (uint8_t)SMB.crc;
119 4 break;
120 4 case 1:
121 4 SMB0DAT = (uint8_t)(SMB.crc>>8);
122 4 SMB_CRC_CLEAR();
123 4 break;
124 4 }
125 3 }
126 2 else
127 2 {
128 3 // end transaction
129 3 SMB0CN0_STO = 1;
130 3 SMB_BUSY_CLEAR();
131 3 SMB.errors = 0;
132 3 }
112 3 {
113 4 case 0:
114 4 SMB.crc = reverse_bits(SMB.crc);
115 4 SMB0DAT = (uint8_t)SMB.crc;
116 4 break;
117 4 case 1:
118 4 SMB0DAT = (uint8_t)(SMB.crc>>8);
119 4 SMB_CRC_CLEAR();
120 4 break;
121 4 }
122 3 }
123 2 else
124 2 {
125 3 // end transaction
126 3 SMB0CN0_STO = 1;
127 3 SMB_BUSY_CLEAR();
128 3 SMB.errors = 0;
129 3 }
130 2
131 2
132 2 break;
133 2
134 2
135 2 break;
134 2 case SMB_STATUS_MRX:
135 2 // read in buffer
136 2
137 2 case SMB_STATUS_MRX:
138 2 // read in buffer
139 2
140 2 if (SMB.read_offset < SMB.read_len)
141 2 {
142 3 SMB.read_buf[SMB.read_offset] = SMB0DAT;
143 3
144 3 // update with length from packet
145 3 // warning this is device specific to atecc508a
146 3 if (SMB.read_offset == 0)
147 3 {
148 4 update_from_packet_length();
149 4 }
150 3
151 3 if ((SMB.read_offset < (SMB.read_len - 2)) && SMB_HAS_CRC())
152 3 {
153 4 SMB.crc = feed_crc(SMB.crc, SMB.read_buf[SMB.read_offset]);
154 4 }
155 3
156 3 SMB.read_offset++;
157 3 SMB0CN0_ACK = 1;
158 3 }
159 2 else
160 2 {
161 3 // end transaction
162 3 if (SMB_HAS_CRC())
163 3 {
164 4 SMB.crc = reverse_bits(SMB.crc);
165 4 }
166 3 SMB_BUSY_CLEAR();
167 3 SMB0CN0_ACK = 0;
168 3 SMB0CN0_STO = 1;
169 3 SMB.errors = 0;
170 3 }
171 2
172 2 break;
173 2
174 2 default:
C51 COMPILER V9.53.0.0 INTERRUPTS 03/28/2016 20:18:25 PAGE 4
137 2 if (SMB.read_offset < SMB.read_len)
138 2 {
139 3 SMB.read_buf[SMB.read_offset] = SMB0DAT;
140 3
141 3 // update with length from packet
142 3 // warning this is device specific to atecc508a
143 3 if (SMB.read_offset == 0)
144 3 {
145 4 update_from_packet_length();
146 4 }
147 3
148 3 if ((SMB.read_offset < (SMB.read_len - 2)) && SMB_HAS_CRC())
149 3 {
150 4 SMB.crc = feed_crc(SMB.crc, SMB.read_buf[SMB.read_offset]);
151 4 }
152 3
153 3 SMB.read_offset++;
154 3 SMB0CN0_ACK = 1;
155 3 }
156 2 else
157 2 {
158 3 // end transaction
159 3 if (SMB_HAS_CRC())
160 3 {
161 4 SMB.crc = reverse_bits(SMB.crc);
162 4 }
163 3 SMB_BUSY_CLEAR();
164 3 SMB0CN0_ACK = 0;
165 3 SMB0CN0_STO = 1;
166 3 SMB.errors = 0;
167 3 }
168 2
169 2 break;
170 2
171 2 default:
172 2 goto fail;
173 2 break;
174 2
C51 COMPILER V9.53.0.0 INTERRUPTS 03/29/2016 00:06:38 PAGE 4
175 2 goto fail;
176 2 break;
177 2
178 2 }
179 1
180 1
181 1 // interrupt flag
182 1 SMB0CN0_SI = 0;
183 1 return;
184 1
185 1 fail:
186 1 u2f_printb("smbus fail ",1,bus);
187 1 restart_bus();
188 1 SMB0CN0_SI = 0;
189 1 }
190
191 //-----------------------------------------------------------------------------
192 // TIMER3_ISR
193 //-----------------------------------------------------------------------------
194 //
195 // TIMER3 ISR Content goes here. Remember to clear flag bits:
196 // TMR3CN::TF3H (Timer # High Byte Overflow Flag)
197 // TMR3CN::TF3L (Timer # Low Byte Overflow Flag)
198 //
175 2 }
176 1
177 1
178 1 // interrupt flag
179 1 SMB0CN0_SI = 0;
180 1 return;
181 1
182 1 fail:
183 1 u2f_printb("smbus fail ",1,bus);
184 1 restart_bus();
185 1 SMB0CN0_SI = 0;
186 1 }
187
188 //-----------------------------------------------------------------------------
189 // TIMER3_ISR
190 //-----------------------------------------------------------------------------
191 //
192 // TIMER3 ISR Content goes here. Remember to clear flag bits:
193 // TMR3CN::TF3H (Timer # High Byte Overflow Flag)
194 // TMR3CN::TF3L (Timer # Low Byte Overflow Flag)
195 //
196 //
197 // A Timer3 interrupt indicates an SMBus SCL low timeout.
198 // The SMBus is disabled and re-enabled here
199 //
200 // A Timer3 interrupt indicates an SMBus SCL low timeout.
201 // The SMBus is disabled and re-enabled here
202 //
203 //-----------------------------------------------------------------------------
204 SI_INTERRUPT (TIMER3_ISR, TIMER3_IRQn)
205 {
206 1 restart_bus();
207 1 }
200 //-----------------------------------------------------------------------------
201 SI_INTERRUPT (TIMER3_ISR, TIMER3_IRQn)
202 {
203 1 restart_bus();
204 1 }
205
206
207
208
209
210
211
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 633 ----
CODE SIZE = 584 ----
CONSTANT SIZE = 12 ----
XDATA SIZE = 23 1
XDATA SIZE = 21 ----
PDATA SIZE = ---- ----
DATA SIZE = 4 ----
DATA SIZE = 5 1
IDATA SIZE = ---- ----
BIT SIZE = ---- ----
EDATA SIZE = ---- ----

Plik binarny nie jest wyświetlany.

Wyświetl plik

@ -1 +1 @@
"/home/pp/apps/u2f-zero/firmware/src/SILABS_STARTUP.A51" ERRORPRINT SET (LARGE) DEBUG MACRO NOMOD51 INCDIR(/home/pp/apps/u2f-zero/firmware/inc/config;/home/pp/apps/u2f-zero/firmware/inc;/home/pp/apps/u2f-zero/firmware/tinyprintf;/home/pp/apps/u2f-zero/firmware/tests;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/shared/si8051Base;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_usb/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/peripheral_driver/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_assert) PRINT(.\src/SILABS_STARTUP.lst) COND SYMBOLS PAGEWIDTH (120) PAGELENGTH (65) OBJECT(.\src/SILABS_STARTUP.OBJ)
"/home/pp/apps/u2f-zero/firmware/src/SILABS_STARTUP.A51" ERRORPRINT SET (LARGE) DEBUG MACRO NOMOD51 INCDIR(/home/pp/apps/u2f-zero/firmware/inc/config;/home/pp/apps/u2f-zero/firmware/inc;/home/pp/apps/u2f-zero/firmware/tests;/home/pp/apps/u2f-zero/firmware/tinyprintf;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/shared/si8051Base;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_usb/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/peripheral_driver/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_assert) PRINT(.\src/SILABS_STARTUP.lst) COND SYMBOLS PAGEWIDTH (120) PAGELENGTH (65) OBJECT(.\src/SILABS_STARTUP.OBJ)

Wyświetl plik

@ -1,4 +1,4 @@
A51 MACRO ASSEMBLER _HOME_PP_APPS_U2F_ZERO_FIRMWARE_SRC_SILAB 03/28/2016 20:17:24 PAGE 1
A51 MACRO ASSEMBLER _HOME_PP_APPS_U2F_ZERO_FIRMWARE_SRC_SILAB 03/29/2016 00:06:38 PAGE 1
MACRO ASSEMBLER A51 V8.02b
@ -6,7 +6,7 @@ OBJECT MODULE PLACED IN .\src/SILABS_STARTUP.OBJ
ASSEMBLER INVOKED BY: Z:\home\pp\SimplicityStudio_v3\developer\toolchains\keil_8051\9.53\BIN\A51.exe /home/pp/apps/u2f-z
ero/firmware/src/SILABS_STARTUP.A51 ERRORPRINT SET(LARGE) DEBUG MACRO NOMOD51 INCDIR(/home/pp/apps
/u2f-zero/firmware/inc/config;/home/pp/apps/u2f-zero/firmware/inc;/home/pp/apps/u2f-zero/firmware/
tinyprintf;/home/pp/apps/u2f-zero/firmware/tests;/home/pp/SimplicityStudio_v3/developer/sdks/si805
tests;/home/pp/apps/u2f-zero/firmware/tinyprintf;/home/pp/SimplicityStudio_v3/developer/sdks/si805
1/v3//Device/shared/si8051Base;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8U
B1;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/inc;/home/pp/SimplicitySt
udio_v3/developer/sdks/si8051/v3//Lib/efm8_usb/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8
@ -62,7 +62,7 @@ LOC OBJ LINE SOURCE
44 ; <o> PDATALEN: PDATA memory size <0x0-0xFF>
45 ; <i> The length of PDATA memory in bytes.
0000 46 PDATALEN EQU 0H
A51 MACRO ASSEMBLER _HOME_PP_APPS_U2F_ZERO_FIRMWARE_SRC_SILAB 03/28/2016 20:17:24 PAGE 2
A51 MACRO ASSEMBLER _HOME_PP_APPS_U2F_ZERO_FIRMWARE_SRC_SILAB 03/29/2016 00:06:38 PAGE 2
47 ;
48 ;</h>
@ -127,7 +127,7 @@ LOC OBJ LINE SOURCE
00E0 107 ACC DATA 0E0H
00F0 108 B DATA 0F0H
0081 109 SP DATA 81H
A51 MACRO ASSEMBLER _HOME_PP_APPS_U2F_ZERO_FIRMWARE_SRC_SILAB 03/28/2016 20:17:24 PAGE 3
A51 MACRO ASSEMBLER _HOME_PP_APPS_U2F_ZERO_FIRMWARE_SRC_SILAB 03/29/2016 00:06:38 PAGE 3
0082 110 DPL DATA 82H
0083 111 DPH DATA 83H
@ -192,7 +192,7 @@ LOC OBJ LINE SOURCE
ENDIF
171
172 IF IBPSTACK <> 0
A51 MACRO ASSEMBLER _HOME_PP_APPS_U2F_ZERO_FIRMWARE_SRC_SILAB 03/28/2016 20:17:24 PAGE 4
A51 MACRO ASSEMBLER _HOME_PP_APPS_U2F_ZERO_FIRMWARE_SRC_SILAB 03/29/2016 00:06:38 PAGE 4
EXTRN DATA (?C_IBP)
@ -226,7 +226,7 @@ LOC OBJ LINE SOURCE
0009 020000 F 201 LJMP ?C_START
202
203 END
A51 MACRO ASSEMBLER _HOME_PP_APPS_U2F_ZERO_FIRMWARE_SRC_SILAB 03/28/2016 20:17:24 PAGE 5
A51 MACRO ASSEMBLER _HOME_PP_APPS_U2F_ZERO_FIRMWARE_SRC_SILAB 03/29/2016 00:06:38 PAGE 5
SYMBOL TABLE LISTING
------ ----- -------

Plik binarny nie jest wyświetlany.

Wyświetl plik

@ -1 +1 @@
"/home/pp/apps/u2f-zero/firmware/src/atecc508a.c" OMF2 LARGE DEBUG OBJECTEXTEND ROM(LARGE) WARNINGLEVEL (2) FLOATFUZZY(3) OPTIMIZE(9,SIZE) INTVECTOR(0x0000) INTPROMOTE INCDIR(/home/pp/apps/u2f-zero/firmware/inc/config;/home/pp/apps/u2f-zero/firmware/inc;/home/pp/apps/u2f-zero/firmware/tinyprintf;/home/pp/apps/u2f-zero/firmware/tests;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/shared/si8051Base;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_usb/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/peripheral_driver/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_assert) REGFILE (u2f-firmware.ORC) PRINT(.\src/atecc508a.lst) COND PAGEWIDTH (120) PAGELENGTH (65) OBJECT(.\src/atecc508a.OBJ)
"/home/pp/apps/u2f-zero/firmware/src/atecc508a.c" OMF2 LARGE DEBUG OBJECTEXTEND ROM(LARGE) WARNINGLEVEL (2) FLOATFUZZY(3) OPTIMIZE(9,SIZE) INTVECTOR(0x0000) INTPROMOTE INCDIR(/home/pp/apps/u2f-zero/firmware/inc/config;/home/pp/apps/u2f-zero/firmware/inc;/home/pp/apps/u2f-zero/firmware/tests;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/shared/si8051Base;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_usb/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/peripheral_driver/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_assert) REGFILE (u2f-firmware.ORC) PRINT(.\src/atecc508a.lst) COND PAGEWIDTH (120) PAGELENGTH (65) OBJECT(.\src/atecc508a.OBJ)

Wyświetl plik

@ -1,4 +1,4 @@
C51 COMPILER V9.53.0.0 ATECC508A 03/28/2016 20:18:25 PAGE 1
C51 COMPILER V9.53.0.0 ATECC508A 03/29/2016 00:06:38 PAGE 1
C51 COMPILER V9.53.0.0, COMPILATION OF MODULE ATECC508A
@ -6,12 +6,12 @@ OBJECT MODULE PLACED IN .\src/atecc508a.OBJ
COMPILER INVOKED BY: Z:\home\pp\SimplicityStudio_v3\developer\toolchains\keil_8051\9.53\BIN\C51.exe /home/pp/apps/u2f-ze
-ro/firmware/src/atecc508a.c OMF2 LARGE DEBUG OBJECTEXTEND ROM(LARGE) WARNINGLEVEL(2) FLOATFUZZY(3) OPTIMIZE(9,SIZE) INTV
-ECTOR(0X0000) INTPROMOTE INCDIR(/home/pp/apps/u2f-zero/firmware/inc/config;/home/pp/apps/u2f-zero/firmware/inc;/home/pp/
-apps/u2f-zero/firmware/tinyprintf;/home/pp/apps/u2f-zero/firmware/tests;/home/pp/SimplicityStudio_v3/developer/sdks/si80
-51/v3//Device/shared/si8051Base;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1;/home/pp/Simplicit
-yStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_
-usb/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/peripheral_driver/inc;/home/pp/SimplicityS
-tudio_v3/developer/sdks/si8051/v3//Lib/efm8_assert) REGFILE(u2f-firmware.ORC) PRINT(.\src/atecc508a.lst) COND PAGEWIDTH(
-120) PAGELENGTH(65) OBJECT(.\src/atecc508a.OBJ)
-apps/u2f-zero/firmware/tests;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/shared/si8051Base;/home/pp/Si
-mplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device
-/EFM8UB1/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_usb/inc;/home/pp/SimplicityStudio_v3/develo
-per/sdks/si8051/v3//Device/EFM8UB1/peripheral_driver/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8
-_assert) REGFILE(u2f-firmware.ORC) PRINT(.\src/atecc508a.lst) COND PAGEWIDTH(120) PAGELENGTH(65) OBJECT(.\src/atecc508a.
-OBJ)
line level source
@ -63,7 +63,7 @@ line level source
46 {
47 1 static data uint8_t params = 0x1;
48 1 smb_write( ATECC508A_ADDR, &params, sizeof(params));
C51 COMPILER V9.53.0.0 ATECC508A 03/28/2016 20:18:25 PAGE 2
C51 COMPILER V9.53.0.0 ATECC508A 03/29/2016 00:06:38 PAGE 2
49 1 }
50
@ -128,7 +128,7 @@ line level source
109 2 d = 50;
110 2 break;
111 2 case ATECC_CMD_GENKEY:
C51 COMPILER V9.53.0.0 ATECC508A 03/28/2016 20:18:25 PAGE 3
C51 COMPILER V9.53.0.0 ATECC508A 03/29/2016 00:06:38 PAGE 3
112 2 d = 100;
113 2 break;
@ -193,7 +193,7 @@ line level source
172 {
173 1 uint8_t buf[7];
174 1 struct atecc_response res;
C51 COMPILER V9.53.0.0 ATECC508A 03/28/2016 20:18:25 PAGE 4
C51 COMPILER V9.53.0.0 ATECC508A 03/29/2016 00:06:38 PAGE 4
175 1
176 1 uint8_t * dstbuf = srcbuf;
@ -258,7 +258,7 @@ line level source
}
static void atecc_setup_config(uint8_t* buf)
C51 COMPILER V9.53.0.0 ATECC508A 03/28/2016 20:18:25 PAGE 5
C51 COMPILER V9.53.0.0 ATECC508A 03/29/2016 00:06:38 PAGE 5
{
struct atecc_response res;
@ -323,7 +323,7 @@ line level source
void atecc_setup_init(uint8_t * buf)
{
if (!is_locked(buf))
C51 COMPILER V9.53.0.0 ATECC508A 03/28/2016 20:18:25 PAGE 6
C51 COMPILER V9.53.0.0 ATECC508A 03/29/2016 00:06:38 PAGE 6
{
u2f_prints("setting up config...\r\n");
@ -355,8 +355,8 @@ line level source
atecc_send_recv(ATECC_CMD_READ,
ATECC_RW_CONFIG | ATECC_RW_EXT, 0, NULL, 0,
buf, 40, &res);
memmove(usbres.buf+1, res.buf, 14);
usbres.buf[0] = 14;
memmove(usbres.buf+1, res.buf, 15);
usbres.buf[0] = 15;
break;
case U2F_CONFIG_IS_BUILD:
@ -388,7 +388,7 @@ line level source
}
break;
case U2F_CONFIG_GENKEY:
C51 COMPILER V9.53.0.0 ATECC508A 03/28/2016 20:18:25 PAGE 7
C51 COMPILER V9.53.0.0 ATECC508A 03/29/2016 00:06:38 PAGE 7
u2f_prints("U2F_CONFIG_GENKEY\r\n");
@ -412,7 +412,7 @@ line level source
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 805 ----
CODE SIZE = 799 ----
CONSTANT SIZE = 11 ----
XDATA SIZE = 2 52
PDATA SIZE = ---- ----

Plik binarny nie jest wyświetlany.

Wyświetl plik

@ -1 +1 @@
"/home/pp/apps/u2f-zero/firmware/src/bsp.c" OMF2 LARGE DEBUG OBJECTEXTEND ROM(LARGE) WARNINGLEVEL (2) FLOATFUZZY(3) OPTIMIZE(9,SIZE) INTVECTOR(0x0000) INTPROMOTE INCDIR(/home/pp/apps/u2f-zero/firmware/inc/config;/home/pp/apps/u2f-zero/firmware/inc;/home/pp/apps/u2f-zero/firmware/tinyprintf;/home/pp/apps/u2f-zero/firmware/tests;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/shared/si8051Base;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_usb/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/peripheral_driver/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_assert) REGFILE (u2f-firmware.ORC) PRINT(.\src/bsp.lst) COND PAGEWIDTH (120) PAGELENGTH (65) OBJECT(.\src/bsp.OBJ)
"/home/pp/apps/u2f-zero/firmware/src/bsp.c" OMF2 LARGE DEBUG OBJECTEXTEND ROM(LARGE) WARNINGLEVEL (2) FLOATFUZZY(3) OPTIMIZE(9,SIZE) INTVECTOR(0x0000) INTPROMOTE INCDIR(/home/pp/apps/u2f-zero/firmware/inc/config;/home/pp/apps/u2f-zero/firmware/inc;/home/pp/apps/u2f-zero/firmware/tests;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/shared/si8051Base;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_usb/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/peripheral_driver/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_assert) REGFILE (u2f-firmware.ORC) PRINT(.\src/bsp.lst) COND PAGEWIDTH (120) PAGELENGTH (65) OBJECT(.\src/bsp.OBJ)

Wyświetl plik

@ -1,4 +1,4 @@
C51 COMPILER V9.53.0.0 BSP 03/28/2016 20:18:26 PAGE 1
C51 COMPILER V9.53.0.0 BSP 03/29/2016 00:06:39 PAGE 1
C51 COMPILER V9.53.0.0, COMPILATION OF MODULE BSP
@ -6,12 +6,11 @@ OBJECT MODULE PLACED IN .\src/bsp.OBJ
COMPILER INVOKED BY: Z:\home\pp\SimplicityStudio_v3\developer\toolchains\keil_8051\9.53\BIN\C51.exe /home/pp/apps/u2f-ze
-ro/firmware/src/bsp.c OMF2 LARGE DEBUG OBJECTEXTEND ROM(LARGE) WARNINGLEVEL(2) FLOATFUZZY(3) OPTIMIZE(9,SIZE) INTVECTOR(
-0X0000) INTPROMOTE INCDIR(/home/pp/apps/u2f-zero/firmware/inc/config;/home/pp/apps/u2f-zero/firmware/inc;/home/pp/apps/u
-2f-zero/firmware/tinyprintf;/home/pp/apps/u2f-zero/firmware/tests;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/
-/Device/shared/si8051Base;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1;/home/pp/SimplicityStudi
-o_v3/developer/sdks/si8051/v3//Device/EFM8UB1/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_usb/in
-c;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/peripheral_driver/inc;/home/pp/SimplicityStudio_
-v3/developer/sdks/si8051/v3//Lib/efm8_assert) REGFILE(u2f-firmware.ORC) PRINT(.\src/bsp.lst) COND PAGEWIDTH(120) PAGELEN
-GTH(65) OBJECT(.\src/bsp.OBJ)
-2f-zero/firmware/tests;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/shared/si8051Base;/home/pp/Simplici
-tyStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8U
-B1/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_usb/inc;/home/pp/SimplicityStudio_v3/developer/sd
-ks/si8051/v3//Device/EFM8UB1/peripheral_driver/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_asser
-t) REGFILE(u2f-firmware.ORC) PRINT(.\src/bsp.lst) COND PAGEWIDTH(120) PAGELENGTH(65) OBJECT(.\src/bsp.OBJ)
line level source
@ -63,9 +62,9 @@ line level source
45
46
47 void dump_hex(uint8_t* hex, uint8_t len)
C51 COMPILER V9.53.0.0 BSP 03/28/2016 20:18:26 PAGE 2
48 {
C51 COMPILER V9.53.0.0 BSP 03/29/2016 00:06:39 PAGE 2
49 1 uint8_t i;
50 1 for (i=0 ; i < len ; i++)
51 1 {
@ -128,9 +127,9 @@ line level source
105 1 do
106 1 {
107 2 *--*snum = __digits[i & 0xf];
C51 COMPILER V9.53.0.0 BSP 03/28/2016 20:18:26 PAGE 3
108 2 i >>= 4;
C51 COMPILER V9.53.0.0 BSP 03/29/2016 00:06:39 PAGE 3
109 2 }while(i);
110 1 }
111
@ -193,9 +192,9 @@ line level source
168 2 u2f_prints(" ");
169 2 }
170 1 u2f_prints("\r\n");
C51 COMPILER V9.53.0.0 BSP 03/28/2016 20:18:26 PAGE 4
171 1 va_end(args);
C51 COMPILER V9.53.0.0 BSP 03/29/2016 00:06:39 PAGE 4
172 1 }
173
174 void u2f_printl(const char * tag, uint8_t c, ...)
@ -258,9 +257,9 @@ line level source
C51 COMPILER V9.53.0.0 BSP 03/28/2016 20:18:26 PAGE 5
C51 COMPILER V9.53.0.0 BSP 03/29/2016 00:06:39 PAGE 5
#endif
236
237

Plik binarny nie jest wyświetlany.

Wyświetl plik

@ -1 +1 @@
"/home/pp/apps/u2f-zero/firmware/src/callback.c" OMF2 LARGE DEBUG OBJECTEXTEND ROM(LARGE) WARNINGLEVEL (2) FLOATFUZZY(3) OPTIMIZE(9,SIZE) INTVECTOR(0x0000) INTPROMOTE INCDIR(/home/pp/apps/u2f-zero/firmware/inc/config;/home/pp/apps/u2f-zero/firmware/inc;/home/pp/apps/u2f-zero/firmware/tinyprintf;/home/pp/apps/u2f-zero/firmware/tests;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/shared/si8051Base;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_usb/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/peripheral_driver/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_assert) REGFILE (u2f-firmware.ORC) PRINT(.\src/callback.lst) COND PAGEWIDTH (120) PAGELENGTH (65) OBJECT(.\src/callback.OBJ)
"/home/pp/apps/u2f-zero/firmware/src/callback.c" OMF2 LARGE DEBUG OBJECTEXTEND ROM(LARGE) WARNINGLEVEL (2) FLOATFUZZY(3) OPTIMIZE(9,SIZE) INTVECTOR(0x0000) INTPROMOTE INCDIR(/home/pp/apps/u2f-zero/firmware/inc/config;/home/pp/apps/u2f-zero/firmware/inc;/home/pp/apps/u2f-zero/firmware/tests;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/shared/si8051Base;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_usb/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/peripheral_driver/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_assert) REGFILE (u2f-firmware.ORC) PRINT(.\src/callback.lst) COND PAGEWIDTH (120) PAGELENGTH (65) OBJECT(.\src/callback.OBJ)

Wyświetl plik

@ -1,4 +1,4 @@
C51 COMPILER V9.53.0.0 CALLBACK 03/28/2016 20:18:26 PAGE 1
C51 COMPILER V9.53.0.0 CALLBACK 03/29/2016 00:06:39 PAGE 1
C51 COMPILER V9.53.0.0, COMPILATION OF MODULE CALLBACK
@ -6,12 +6,12 @@ OBJECT MODULE PLACED IN .\src/callback.OBJ
COMPILER INVOKED BY: Z:\home\pp\SimplicityStudio_v3\developer\toolchains\keil_8051\9.53\BIN\C51.exe /home/pp/apps/u2f-ze
-ro/firmware/src/callback.c OMF2 LARGE DEBUG OBJECTEXTEND ROM(LARGE) WARNINGLEVEL(2) FLOATFUZZY(3) OPTIMIZE(9,SIZE) INTVE
-CTOR(0X0000) INTPROMOTE INCDIR(/home/pp/apps/u2f-zero/firmware/inc/config;/home/pp/apps/u2f-zero/firmware/inc;/home/pp/a
-pps/u2f-zero/firmware/tinyprintf;/home/pp/apps/u2f-zero/firmware/tests;/home/pp/SimplicityStudio_v3/developer/sdks/si805
-1/v3//Device/shared/si8051Base;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1;/home/pp/Simplicity
-Studio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_u
-sb/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/peripheral_driver/inc;/home/pp/SimplicitySt
-udio_v3/developer/sdks/si8051/v3//Lib/efm8_assert) REGFILE(u2f-firmware.ORC) PRINT(.\src/callback.lst) COND PAGEWIDTH(12
-0) PAGELENGTH(65) OBJECT(.\src/callback.OBJ)
-pps/u2f-zero/firmware/tests;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/shared/si8051Base;/home/pp/Sim
-plicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/
-EFM8UB1/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_usb/inc;/home/pp/SimplicityStudio_v3/develop
-er/sdks/si8051/v3//Device/EFM8UB1/peripheral_driver/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_
-assert) REGFILE(u2f-firmware.ORC) PRINT(.\src/callback.lst) COND PAGEWIDTH(120) PAGELENGTH(65) OBJECT(.\src/callback.OBJ
-)
line level source
@ -63,7 +63,7 @@ line level source
46 USBD_State_TypeDef newState) {
47 1 u2f_print_ev("USBD_DeviceStateChangeCb\r\n");
48 1 }
C51 COMPILER V9.53.0.0 CALLBACK 03/28/2016 20:18:26 PAGE 2
C51 COMPILER V9.53.0.0 CALLBACK 03/29/2016 00:06:39 PAGE 2
*** WARNING C280 IN LINE 45 OF /home/pp/apps/u2f-zero/firmware/src/callback.c: 'oldState': unreferenced local variable
*** WARNING C280 IN LINE 46 OF /home/pp/apps/u2f-zero/firmware/src/callback.c: 'newState': unreferenced local variable
@ -128,7 +128,7 @@ line level source
107 3 case USB_HID_GET_REPORT:
108 3
109 3 break;
C51 COMPILER V9.53.0.0 CALLBACK 03/28/2016 20:18:26 PAGE 3
C51 COMPILER V9.53.0.0 CALLBACK 03/29/2016 00:06:39 PAGE 3
110 3
111 3 case USB_HID_SET_IDLE:
@ -193,7 +193,7 @@ line level source
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 465 ----
C51 COMPILER V9.53.0.0 CALLBACK 03/28/2016 20:18:26 PAGE 4
C51 COMPILER V9.53.0.0 CALLBACK 03/29/2016 00:06:39 PAGE 4
CONSTANT SIZE = ---- ----
XDATA SIZE = 65 11

Plik binarny nie jest wyświetlany.

Wyświetl plik

@ -1 +1 @@
"/home/pp/apps/u2f-zero/firmware/src/descriptors.c" OMF2 LARGE DEBUG OBJECTEXTEND ROM(LARGE) WARNINGLEVEL (2) FLOATFUZZY(3) OPTIMIZE(9,SIZE) INTVECTOR(0x0000) INTPROMOTE INCDIR(/home/pp/apps/u2f-zero/firmware/inc/config;/home/pp/apps/u2f-zero/firmware/inc;/home/pp/apps/u2f-zero/firmware/tinyprintf;/home/pp/apps/u2f-zero/firmware/tests;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/shared/si8051Base;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_usb/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/peripheral_driver/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_assert) REGFILE (u2f-firmware.ORC) PRINT(.\src/descriptors.lst) COND PAGEWIDTH (120) PAGELENGTH (65) OBJECT(.\src/descriptors.OBJ)
"/home/pp/apps/u2f-zero/firmware/src/descriptors.c" OMF2 LARGE DEBUG OBJECTEXTEND ROM(LARGE) WARNINGLEVEL (2) FLOATFUZZY(3) OPTIMIZE(9,SIZE) INTVECTOR(0x0000) INTPROMOTE INCDIR(/home/pp/apps/u2f-zero/firmware/inc/config;/home/pp/apps/u2f-zero/firmware/inc;/home/pp/apps/u2f-zero/firmware/tests;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/shared/si8051Base;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_usb/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/peripheral_driver/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_assert) REGFILE (u2f-firmware.ORC) PRINT(.\src/descriptors.lst) COND PAGEWIDTH (120) PAGELENGTH (65) OBJECT(.\src/descriptors.OBJ)

Wyświetl plik

@ -1,4 +1,4 @@
C51 COMPILER V9.53.0.0 DESCRIPTORS 03/28/2016 20:17:25 PAGE 1
C51 COMPILER V9.53.0.0 DESCRIPTORS 03/29/2016 00:06:39 PAGE 1
C51 COMPILER V9.53.0.0, COMPILATION OF MODULE DESCRIPTORS
@ -6,12 +6,12 @@ OBJECT MODULE PLACED IN .\src/descriptors.OBJ
COMPILER INVOKED BY: Z:\home\pp\SimplicityStudio_v3\developer\toolchains\keil_8051\9.53\BIN\C51.exe /home/pp/apps/u2f-ze
-ro/firmware/src/descriptors.c OMF2 LARGE DEBUG OBJECTEXTEND ROM(LARGE) WARNINGLEVEL(2) FLOATFUZZY(3) OPTIMIZE(9,SIZE) IN
-TVECTOR(0X0000) INTPROMOTE INCDIR(/home/pp/apps/u2f-zero/firmware/inc/config;/home/pp/apps/u2f-zero/firmware/inc;/home/p
-p/apps/u2f-zero/firmware/tinyprintf;/home/pp/apps/u2f-zero/firmware/tests;/home/pp/SimplicityStudio_v3/developer/sdks/si
-8051/v3//Device/shared/si8051Base;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1;/home/pp/Simplic
-ityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm
-8_usb/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/peripheral_driver/inc;/home/pp/Simplicit
-yStudio_v3/developer/sdks/si8051/v3//Lib/efm8_assert) REGFILE(u2f-firmware.ORC) PRINT(.\src/descriptors.lst) COND PAGEWI
-DTH(120) PAGELENGTH(65) OBJECT(.\src/descriptors.OBJ)
-p/apps/u2f-zero/firmware/tests;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/shared/si8051Base;/home/pp/
-SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Devi
-ce/EFM8UB1/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_usb/inc;/home/pp/SimplicityStudio_v3/deve
-loper/sdks/si8051/v3//Device/EFM8UB1/peripheral_driver/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/ef
-m8_assert) REGFILE(u2f-firmware.ORC) PRINT(.\src/descriptors.lst) COND PAGEWIDTH(120) PAGELENGTH(65) OBJECT(.\src/descri
-ptors.OBJ)
line level source
@ -63,7 +63,7 @@ line level source
46 0x75, 0x08, // REPORT_SIZE (8)
47 0x95, HID_PACKET_SIZE, // REPORT_COUNT (64)
48 0x91, 0x02, // OUTPUT (Data,Var,Abs)
C51 COMPILER V9.53.0.0 DESCRIPTORS 03/28/2016 20:17:25 PAGE 2
C51 COMPILER V9.53.0.0 DESCRIPTORS 03/29/2016 00:06:39 PAGE 2
49
50
@ -128,7 +128,7 @@ line level source
109 sizeof( ReportDescriptor0 ),// wDescriptorLength(LSB)
110 sizeof( ReportDescriptor0 )>>8,// wDescriptorLength(MSB)
111
C51 COMPILER V9.53.0.0 DESCRIPTORS 03/28/2016 20:17:25 PAGE 3
C51 COMPILER V9.53.0.0 DESCRIPTORS 03/29/2016 00:06:39 PAGE 3
112 //Endpoint 1 IN Descriptor
113 USB_ENDPOINT_DESCSIZE,// bLength
@ -193,7 +193,7 @@ line level source
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = ---- ----
C51 COMPILER V9.53.0.0 DESCRIPTORS 03/28/2016 20:17:25 PAGE 4
C51 COMPILER V9.53.0.0 DESCRIPTORS 03/29/2016 00:06:39 PAGE 4
CONSTANT SIZE = 186 ----
XDATA SIZE = ---- ----

Plik binarny nie jest wyświetlany.

Wyświetl plik

@ -1 +1 @@
"/home/pp/apps/u2f-zero/firmware/src/eeprom.c" OMF2 LARGE DEBUG OBJECTEXTEND ROM(LARGE) WARNINGLEVEL (2) FLOATFUZZY(3) OPTIMIZE(9,SIZE) INTVECTOR(0x0000) INTPROMOTE INCDIR(/home/pp/apps/u2f-zero/firmware/inc/config;/home/pp/apps/u2f-zero/firmware/inc;/home/pp/apps/u2f-zero/firmware/tinyprintf;/home/pp/apps/u2f-zero/firmware/tests;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/shared/si8051Base;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_usb/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/peripheral_driver/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_assert) REGFILE (u2f-firmware.ORC) PRINT(.\src/eeprom.lst) COND PAGEWIDTH (120) PAGELENGTH (65) OBJECT(.\src/eeprom.OBJ)
"/home/pp/apps/u2f-zero/firmware/src/eeprom.c" OMF2 LARGE DEBUG OBJECTEXTEND ROM(LARGE) WARNINGLEVEL (2) FLOATFUZZY(3) OPTIMIZE(9,SIZE) INTVECTOR(0x0000) INTPROMOTE INCDIR(/home/pp/apps/u2f-zero/firmware/inc/config;/home/pp/apps/u2f-zero/firmware/inc;/home/pp/apps/u2f-zero/firmware/tests;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/shared/si8051Base;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_usb/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/peripheral_driver/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_assert) REGFILE (u2f-firmware.ORC) PRINT(.\src/eeprom.lst) COND PAGEWIDTH (120) PAGELENGTH (65) OBJECT(.\src/eeprom.OBJ)

Wyświetl plik

@ -1,4 +1,4 @@
C51 COMPILER V9.53.0.0 EEPROM 03/28/2016 20:17:25 PAGE 1
C51 COMPILER V9.53.0.0 EEPROM 03/29/2016 00:06:39 PAGE 1
C51 COMPILER V9.53.0.0, COMPILATION OF MODULE EEPROM
@ -6,12 +6,11 @@ OBJECT MODULE PLACED IN .\src/eeprom.OBJ
COMPILER INVOKED BY: Z:\home\pp\SimplicityStudio_v3\developer\toolchains\keil_8051\9.53\BIN\C51.exe /home/pp/apps/u2f-ze
-ro/firmware/src/eeprom.c OMF2 LARGE DEBUG OBJECTEXTEND ROM(LARGE) WARNINGLEVEL(2) FLOATFUZZY(3) OPTIMIZE(9,SIZE) INTVECT
-OR(0X0000) INTPROMOTE INCDIR(/home/pp/apps/u2f-zero/firmware/inc/config;/home/pp/apps/u2f-zero/firmware/inc;/home/pp/app
-s/u2f-zero/firmware/tinyprintf;/home/pp/apps/u2f-zero/firmware/tests;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/
-v3//Device/shared/si8051Base;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1;/home/pp/SimplicitySt
-udio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_usb
-/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/peripheral_driver/inc;/home/pp/SimplicityStud
-io_v3/developer/sdks/si8051/v3//Lib/efm8_assert) REGFILE(u2f-firmware.ORC) PRINT(.\src/eeprom.lst) COND PAGEWIDTH(120) P
-AGELENGTH(65) OBJECT(.\src/eeprom.OBJ)
-s/u2f-zero/firmware/tests;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/shared/si8051Base;/home/pp/Simpl
-icityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EF
-M8UB1/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_usb/inc;/home/pp/SimplicityStudio_v3/developer
-/sdks/si8051/v3//Device/EFM8UB1/peripheral_driver/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_as
-sert) REGFILE(u2f-firmware.ORC) PRINT(.\src/eeprom.lst) COND PAGEWIDTH(120) PAGELENGTH(65) OBJECT(.\src/eeprom.OBJ)
line level source
@ -63,9 +62,9 @@ line level source
46 2 IE_EA = 0;
47 2 // Enable VDD monitor
48 2 VDM0CN = 0x80;
C51 COMPILER V9.53.0.0 EEPROM 03/28/2016 20:17:25 PAGE 2
49 2 RSTSRC = 0x02;
C51 COMPILER V9.53.0.0 EEPROM 03/29/2016 00:06:39 PAGE 2
50 2
51 2 // unlock key
52 2 FLKEY = 0xA5;

Plik binarny nie jest wyświetlany.

Wyświetl plik

@ -1 +1 @@
"/home/pp/apps/u2f-zero/firmware/src/i2c.c" OMF2 LARGE DEBUG OBJECTEXTEND ROM(LARGE) WARNINGLEVEL (2) FLOATFUZZY(3) OPTIMIZE(9,SIZE) INTVECTOR(0x0000) INTPROMOTE INCDIR(/home/pp/apps/u2f-zero/firmware/inc/config;/home/pp/apps/u2f-zero/firmware/inc;/home/pp/apps/u2f-zero/firmware/tinyprintf;/home/pp/apps/u2f-zero/firmware/tests;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/shared/si8051Base;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_usb/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/peripheral_driver/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_assert) REGFILE (u2f-firmware.ORC) PRINT(.\src/i2c.lst) COND PAGEWIDTH (120) PAGELENGTH (65) OBJECT(.\src/i2c.OBJ)
"/home/pp/apps/u2f-zero/firmware/src/i2c.c" OMF2 LARGE DEBUG OBJECTEXTEND ROM(LARGE) WARNINGLEVEL (2) FLOATFUZZY(3) OPTIMIZE(9,SIZE) INTVECTOR(0x0000) INTPROMOTE INCDIR(/home/pp/apps/u2f-zero/firmware/inc/config;/home/pp/apps/u2f-zero/firmware/inc;/home/pp/apps/u2f-zero/firmware/tests;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/shared/si8051Base;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_usb/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/peripheral_driver/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_assert) REGFILE (u2f-firmware.ORC) PRINT(.\src/i2c.lst) COND PAGEWIDTH (120) PAGELENGTH (65) OBJECT(.\src/i2c.OBJ)

Wyświetl plik

@ -1,4 +1,4 @@
C51 COMPILER V9.53.0.0 I2C 03/28/2016 20:18:26 PAGE 1
C51 COMPILER V9.53.0.0 I2C 03/29/2016 00:06:39 PAGE 1
C51 COMPILER V9.53.0.0, COMPILATION OF MODULE I2C
@ -6,12 +6,11 @@ OBJECT MODULE PLACED IN .\src/i2c.OBJ
COMPILER INVOKED BY: Z:\home\pp\SimplicityStudio_v3\developer\toolchains\keil_8051\9.53\BIN\C51.exe /home/pp/apps/u2f-ze
-ro/firmware/src/i2c.c OMF2 LARGE DEBUG OBJECTEXTEND ROM(LARGE) WARNINGLEVEL(2) FLOATFUZZY(3) OPTIMIZE(9,SIZE) INTVECTOR(
-0X0000) INTPROMOTE INCDIR(/home/pp/apps/u2f-zero/firmware/inc/config;/home/pp/apps/u2f-zero/firmware/inc;/home/pp/apps/u
-2f-zero/firmware/tinyprintf;/home/pp/apps/u2f-zero/firmware/tests;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/
-/Device/shared/si8051Base;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1;/home/pp/SimplicityStudi
-o_v3/developer/sdks/si8051/v3//Device/EFM8UB1/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_usb/in
-c;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/peripheral_driver/inc;/home/pp/SimplicityStudio_
-v3/developer/sdks/si8051/v3//Lib/efm8_assert) REGFILE(u2f-firmware.ORC) PRINT(.\src/i2c.lst) COND PAGEWIDTH(120) PAGELEN
-GTH(65) OBJECT(.\src/i2c.OBJ)
-2f-zero/firmware/tests;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/shared/si8051Base;/home/pp/Simplici
-tyStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8U
-B1/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_usb/inc;/home/pp/SimplicityStudio_v3/developer/sd
-ks/si8051/v3//Device/EFM8UB1/peripheral_driver/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_asser
-t) REGFILE(u2f-firmware.ORC) PRINT(.\src/i2c.lst) COND PAGEWIDTH(120) PAGELENGTH(65) OBJECT(.\src/i2c.OBJ)
line level source
@ -63,9 +62,9 @@ line level source
46
47
48 void smb_write (uint8_t addr, uint8_t* buf, uint8_t len)
C51 COMPILER V9.53.0.0 I2C 03/28/2016 20:18:26 PAGE 2
49 {
C51 COMPILER V9.53.0.0 I2C 03/29/2016 00:06:39 PAGE 2
50 1 if (while_busy()) return;
51 1
52 1 SMB_FLAGS = SMB_WRITE | SMB_BUSY | SMB.preflags;
@ -127,10 +126,10 @@ line level source
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 548 ----
C51 COMPILER V9.53.0.0 I2C 03/28/2016 20:18:26 PAGE 3
CODE SIZE = 536 ----
CONSTANT SIZE = ---- ----
C51 COMPILER V9.53.0.0 I2C 03/29/2016 00:06:39 PAGE 3
XDATA SIZE = ---- 14
PDATA SIZE = ---- ----
DATA SIZE = ---- ----

Plik binarny nie jest wyświetlany.

Wyświetl plik

@ -1 +1 @@
"/home/pp/apps/u2f-zero/firmware/src/idle.c" OMF2 LARGE DEBUG OBJECTEXTEND ROM(LARGE) WARNINGLEVEL (2) FLOATFUZZY(3) OPTIMIZE(9,SIZE) INTVECTOR(0x0000) INTPROMOTE INCDIR(/home/pp/apps/u2f-zero/firmware/inc/config;/home/pp/apps/u2f-zero/firmware/inc;/home/pp/apps/u2f-zero/firmware/tinyprintf;/home/pp/apps/u2f-zero/firmware/tests;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/shared/si8051Base;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_usb/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/peripheral_driver/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_assert) REGFILE (u2f-firmware.ORC) PRINT(.\src/idle.lst) COND PAGEWIDTH (120) PAGELENGTH (65) OBJECT(.\src/idle.OBJ)
"/home/pp/apps/u2f-zero/firmware/src/idle.c" OMF2 LARGE DEBUG OBJECTEXTEND ROM(LARGE) WARNINGLEVEL (2) FLOATFUZZY(3) OPTIMIZE(9,SIZE) INTVECTOR(0x0000) INTPROMOTE INCDIR(/home/pp/apps/u2f-zero/firmware/inc/config;/home/pp/apps/u2f-zero/firmware/inc;/home/pp/apps/u2f-zero/firmware/tests;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/shared/si8051Base;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_usb/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/peripheral_driver/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_assert) REGFILE (u2f-firmware.ORC) PRINT(.\src/idle.lst) COND PAGEWIDTH (120) PAGELENGTH (65) OBJECT(.\src/idle.OBJ)

Wyświetl plik

@ -1,4 +1,4 @@
C51 COMPILER V9.53.0.0 IDLE 03/28/2016 20:17:25 PAGE 1
C51 COMPILER V9.53.0.0 IDLE 03/29/2016 00:06:39 PAGE 1
C51 COMPILER V9.53.0.0, COMPILATION OF MODULE IDLE
@ -6,12 +6,11 @@ OBJECT MODULE PLACED IN .\src/idle.OBJ
COMPILER INVOKED BY: Z:\home\pp\SimplicityStudio_v3\developer\toolchains\keil_8051\9.53\BIN\C51.exe /home/pp/apps/u2f-ze
-ro/firmware/src/idle.c OMF2 LARGE DEBUG OBJECTEXTEND ROM(LARGE) WARNINGLEVEL(2) FLOATFUZZY(3) OPTIMIZE(9,SIZE) INTVECTOR
-(0X0000) INTPROMOTE INCDIR(/home/pp/apps/u2f-zero/firmware/inc/config;/home/pp/apps/u2f-zero/firmware/inc;/home/pp/apps/
-u2f-zero/firmware/tinyprintf;/home/pp/apps/u2f-zero/firmware/tests;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3
-//Device/shared/si8051Base;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1;/home/pp/SimplicityStud
-io_v3/developer/sdks/si8051/v3//Device/EFM8UB1/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_usb/i
-nc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/peripheral_driver/inc;/home/pp/SimplicityStudio
-_v3/developer/sdks/si8051/v3//Lib/efm8_assert) REGFILE(u2f-firmware.ORC) PRINT(.\src/idle.lst) COND PAGEWIDTH(120) PAGEL
-ENGTH(65) OBJECT(.\src/idle.OBJ)
-u2f-zero/firmware/tests;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/shared/si8051Base;/home/pp/Simplic
-ityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8
-UB1/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_usb/inc;/home/pp/SimplicityStudio_v3/developer/s
-dks/si8051/v3//Device/EFM8UB1/peripheral_driver/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_asse
-rt) REGFILE(u2f-firmware.ORC) PRINT(.\src/idle.lst) COND PAGEWIDTH(120) PAGELENGTH(65) OBJECT(.\src/idle.OBJ)
line level source
@ -63,9 +62,9 @@ line level source
46 2 idleTimerStart();
47 2 return 1;
48 2 }
C51 COMPILER V9.53.0.0 IDLE 03/28/2016 20:17:25 PAGE 2
49 1 return 0;
C51 COMPILER V9.53.0.0 IDLE 03/29/2016 00:06:39 PAGE 2
50 1 }
51
52 void idleTimerSet(uint8_t rate)

Plik binarny nie jest wyświetlany.

Wyświetl plik

@ -1 +1 @@
"/home/pp/apps/u2f-zero/firmware/src/main.c" OMF2 LARGE DEBUG OBJECTEXTEND ROM(LARGE) WARNINGLEVEL (2) FLOATFUZZY(3) OPTIMIZE(9,SIZE) INTVECTOR(0x0000) INTPROMOTE INCDIR(/home/pp/apps/u2f-zero/firmware/inc/config;/home/pp/apps/u2f-zero/firmware/inc;/home/pp/apps/u2f-zero/firmware/tinyprintf;/home/pp/apps/u2f-zero/firmware/tests;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/shared/si8051Base;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_usb/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/peripheral_driver/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_assert) REGFILE (u2f-firmware.ORC) PRINT(.\src/main.lst) COND PAGEWIDTH (120) PAGELENGTH (65) OBJECT(.\src/main.OBJ)
"/home/pp/apps/u2f-zero/firmware/src/main.c" OMF2 LARGE DEBUG OBJECTEXTEND ROM(LARGE) WARNINGLEVEL (2) FLOATFUZZY(3) OPTIMIZE(9,SIZE) INTVECTOR(0x0000) INTPROMOTE INCDIR(/home/pp/apps/u2f-zero/firmware/inc/config;/home/pp/apps/u2f-zero/firmware/inc;/home/pp/apps/u2f-zero/firmware/tests;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/shared/si8051Base;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_usb/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/peripheral_driver/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_assert) REGFILE (u2f-firmware.ORC) PRINT(.\src/main.lst) COND PAGEWIDTH (120) PAGELENGTH (65) OBJECT(.\src/main.OBJ)

Wyświetl plik

@ -1,4 +1,4 @@
C51 COMPILER V9.53.0.0 MAIN 03/28/2016 20:19:13 PAGE 1
C51 COMPILER V9.53.0.0 MAIN 03/29/2016 00:06:39 PAGE 1
C51 COMPILER V9.53.0.0, COMPILATION OF MODULE MAIN
@ -6,12 +6,11 @@ OBJECT MODULE PLACED IN .\src/main.OBJ
COMPILER INVOKED BY: Z:\home\pp\SimplicityStudio_v3\developer\toolchains\keil_8051\9.53\BIN\C51.exe /home/pp/apps/u2f-ze
-ro/firmware/src/main.c OMF2 LARGE DEBUG OBJECTEXTEND ROM(LARGE) WARNINGLEVEL(2) FLOATFUZZY(3) OPTIMIZE(9,SIZE) INTVECTOR
-(0X0000) INTPROMOTE INCDIR(/home/pp/apps/u2f-zero/firmware/inc/config;/home/pp/apps/u2f-zero/firmware/inc;/home/pp/apps/
-u2f-zero/firmware/tinyprintf;/home/pp/apps/u2f-zero/firmware/tests;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3
-//Device/shared/si8051Base;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1;/home/pp/SimplicityStud
-io_v3/developer/sdks/si8051/v3//Device/EFM8UB1/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_usb/i
-nc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/peripheral_driver/inc;/home/pp/SimplicityStudio
-_v3/developer/sdks/si8051/v3//Lib/efm8_assert) REGFILE(u2f-firmware.ORC) PRINT(.\src/main.lst) COND PAGEWIDTH(120) PAGEL
-ENGTH(65) OBJECT(.\src/main.OBJ)
-u2f-zero/firmware/tests;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/shared/si8051Base;/home/pp/Simplic
-ityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8
-UB1/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_usb/inc;/home/pp/SimplicityStudio_v3/developer/s
-dks/si8051/v3//Device/EFM8UB1/peripheral_driver/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_asse
-rt) REGFILE(u2f-firmware.ORC) PRINT(.\src/main.lst) COND PAGEWIDTH(120) PAGELENGTH(65) OBJECT(.\src/main.OBJ)
line level source
@ -59,136 +58,143 @@ line level source
42 1 }
43
44
45 //void dump_eeprom()
46 //{
47 // // 0xF800 - 0xFB7F
48 // uint16_t i = 0xF800;
C51 COMPILER V9.53.0.0 MAIN 03/28/2016 20:19:13 PAGE 2
45 void rgb(uint8_t r, uint8_t g, uint8_t b)
46 {
47 1 LED_B(b);
48 1 LED_G(g);
49 1 LED_R(r);
C51 COMPILER V9.53.0.0 MAIN 03/29/2016 00:06:39 PAGE 2
49 // uint8_t eep;
50 // for (; i <= 0xF800 + 4 * 16; i++)
51 // {
52 // eeprom_read(i,&eep,1);
53 // u2f_putb(eep);
54 // u2f_prints(" ");
55 // }
56 // u2f_prints("\r\n");
57 //}
58
59 int8_t test_app()
60 {
61 1 //u2f_printl("count: ",1,u2f_count());
62 1 return 0;
63 1 }
64
65 #define ms_since(ms,num) (((uint16_t)get_ms() - (ms)) >= num ? (1|(ms=(uint16_t)get_ms())):0)
66
67
68
69 int16_t main(void) {
70 1
71 1 data uint8_t i = 0;
72 1 data uint16_t last_ms = get_ms();
73 1 data uint16_t ms_heart;
74 1 data uint16_t ms_wink;
75 1 data uint8_t winks = 0;
76 1 uint8_t leds = 0;
77 1 uint16_t button = 0;
78 1
79 1 enter_DefaultMode_from_RESET();
80 1 init(&appdata);
81 1
82 1 // STDIO library requires TI to print
83 1 SCON0_TI = 1;
84 1
85 1 // Enable interrupts
86 1 IE_EA = 1;
87 1
88 1 u2f_prints("U2F ZERO\r\n");
89 1
90 1 run_tests();
91 1 atecc_setup_init(appdata.tmp);
92 1
93 1
94 1 while (1) {
95 2
96 2 if (ms_since(ms_heart,500))
97 2 {
98 3 u2f_printl("ms ", 1, get_ms());
99 3 button = U2F_BUTTON;
100 3 u2f_printx("button: ",1,button);
101 3 LED_G = !LED_G;
102 3 test_app();
103 3 }
104 2
105 2
106 2 if (!USBD_EpIsBusy(EP1OUT) && !USBD_EpIsBusy(EP1IN) && appdata.state != APP_HID_MSG)
107 2 {
108 3 USBD_Read(EP1OUT, hidmsgbuf, sizeof(hidmsgbuf), true);
109 3 // u2f_prints("read added\r\n");
110 3 }
111 2
C51 COMPILER V9.53.0.0 MAIN 03/28/2016 20:19:13 PAGE 3
50 1 }
51
52
53 #define ms_since(ms,num) (((uint16_t)get_ms() - (ms)) >= num ? (1|(ms=(uint16_t)get_ms())):0)
54
55
56
57 int16_t main(void) {
58 1
59 1 uint16_t ms_heart;
60 1 uint16_t ms_wink;
61 1 uint16_t ms_grad;
62 1 uint8_t winks = 0;
63 1 uint8_t grad_dir = 0;
64 1 uint8_t light = 0;
65 1
66 1 enter_DefaultMode_from_RESET();
67 1 init(&appdata);
68 1
69 1 // STDIO library requires TI to print
70 1 SCON0_TI = 1;
71 1
72 1 // Enable interrupts
73 1 IE_EA = 1;
74 1
75 1 u2f_prints("U2F ZERO\r\n");
76 1
77 1 run_tests();
78 1 atecc_setup_init(appdata.tmp);
79 1
80 1
81 1 while (1) {
82 2
83 2 if (ms_since(ms_heart,500))
84 2 {
85 3 u2f_printl("ms ", 1, get_ms());
86 3 }
87 2
88 2
89 2 if (!USBD_EpIsBusy(EP1OUT) && !USBD_EpIsBusy(EP1IN) && appdata.state != APP_HID_MSG)
90 2 {
91 3 USBD_Read(EP1OUT, hidmsgbuf, sizeof(hidmsgbuf), true);
92 3 }
93 2
94 2 switch(appdata.state)
95 2 {
96 3 case APP_NOTHING:
97 3 if (ms_since(ms_grad, 10))
98 3 {
99 4 if (light == 90)
100 4 {
101 5 grad_dir = 0;
102 5 }
103 4 else if (light == 0)
104 4 {
105 5 grad_dir = 1;
106 5 }
107 4 if (grad_dir)
108 4 if (U2F_BUTTON_IS_PRESSED())
109 4 rgb(0,0,light++);
110 4 else
111 4 rgb(0,light++,0);
112 4 else
C51 COMPILER V9.53.0.0 MAIN 03/29/2016 00:06:39 PAGE 3
112 2 switch(appdata.state)
113 2 {
114 3 case APP_NOTHING:
115 3 break;
116 3 case APP_HID_MSG:
117 3 #ifndef ATECC_SETUP_DEVICE
118 3 u2f_hid_request(appdata.hid_msg);
119 3 #else
113 4 if (U2F_BUTTON_IS_PRESSED())
114 4 rgb(0,0,light--);
115 4 else
116 4 rgb(0,light--,0);
117 4 }
118 3 break;
119 3 case APP_HID_MSG:
120 3 #ifndef ATECC_SETUP_DEVICE
121 3 u2f_hid_request(appdata.hid_msg);
122 3 #else
atecc_setup_device((struct config_msg*)appdata.hid_msg);
#endif
122 3 if (appdata.state == APP_HID_MSG)
123 3 appdata.state = APP_NOTHING;
124 3 break;
125 3 case APP_WINK:
126 3 LED_B = 0;
127 3 ms_wink = get_ms();
128 3 appdata.state = _APP_WINK;
129 3 break;
130 3 case _APP_WINK:
131 3 LED_G = 1;
132 3 LED_R = 1;
133 3 if (ms_since(ms_wink,150))
134 3 {
135 4 LED_B = !LED_B;
136 4 winks++;
137 4 }
138 3 if (winks == 5)
139 3 {
140 4 winks = 0;
141 4 appdata.state = APP_NOTHING;
142 4 }
143 3 break;
144 3 }
145 2
146 2 if (appdata.error)
147 2 {
148 3 u2f_printb("error: ", 1, appdata.error);
149 3 appdata.error = 0;
150 3 }
151 2
152 2
153 2 }
154 1 }
155
156
125 3 if (appdata.state == APP_HID_MSG)
126 3 appdata.state = APP_NOTHING;
127 3 break;
128 3 case APP_WINK:
129 3 rgb(0,0,150);
130 3 light = 150;
131 3 ms_wink = get_ms();
132 3 appdata.state = _APP_WINK;
133 3 break;
134 3 case _APP_WINK:
135 3
136 3 if (ms_since(ms_wink,150))
137 3 {
138 4 rgb(0,0,light);
139 4 light = light == 0 ? 150 : 0;
140 4 winks++;
141 4 }
142 3 if (winks == 5)
143 3 {
144 4 winks = 0;
145 4 appdata.state = APP_NOTHING;
146 4 }
147 3 break;
148 3 }
149 2
150 2 if (appdata.error)
151 2 {
152 3 u2f_printb("error: ", 1, appdata.error);
153 3 appdata.error = 0;
154 3 rgb(200,0,0);
155 3 }
156 2
157 2
158 2 }
159 1 }
160
161
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 369 ----
CONSTANT SIZE = 32 ----
XDATA SIZE = ---- 3
CODE SIZE = 507 ----
CONSTANT SIZE = 23 ----
XDATA SIZE = ---- 9
PDATA SIZE = ---- ----
DATA SIZE = 75 8
DATA SIZE = 75 ----
IDATA SIZE = ---- ----
BIT SIZE = ---- ----
EDATA SIZE = ---- ----
HDATA SIZE = ---- ----
XDATA CONST SIZE = ---- ----
FAR CONST SIZE = ---- ----
C51 COMPILER V9.53.0.0 MAIN 03/29/2016 00:06:39 PAGE 4
END OF MODULE INFORMATION.

Wyświetl plik

@ -63,15 +63,19 @@ src/bsp.OBJ: /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Device/EFM8UB
src/callback.OBJ: /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Device/EFM8UB1/inc/SI_EFM8UB1_Register_Enums.h /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Lib/efm8_usb/inc/efm8_usb.h /home/pp/apps/u2f-zero/firmware/inc/idle.h /home/pp/apps/u2f-zero/firmware/inc/app.h /home/pp/apps/u2f-zero/firmware/inc/bsp.h /home/pp/apps/u2f-zero/firmware/inc/descriptors.h /home/pp/apps/u2f-zero/firmware/inc/u2f_hid.h /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Device/EFM8UB1/inc/SI_EFM8UB1_Defs.h /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Device/shared/si8051Base/si_toolchain.h /home/pp/apps/u2f-zero/firmware/inc/config/usbconfig.h /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Device/shared/si8051Base/stdbool.h /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Device/shared/si8051Base/stdint.h /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Device/EFM8UB1/peripheral_driver/inc/usb_0.h /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Device/shared/si8051Base/endian.h /home/pp/apps/u2f-zero/firmware/inc/config/efm8_config.h
src/descriptors.OBJ: /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Device/shared/si8051Base/si_toolchain.h /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Device/shared/si8051Base/endian.h /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Lib/efm8_usb/inc/efm8_usb.h /home/pp/apps/u2f-zero/firmware/inc/descriptors.h /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Device/shared/si8051Base/stdint.h /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Device/shared/si8051Base/stdbool.h /home/pp/apps/u2f-zero/firmware/inc/config/usbconfig.h /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Device/EFM8UB1/peripheral_driver/inc/usb_0.h /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Device/EFM8UB1/inc/SI_EFM8UB1_Register_Enums.h /home/pp/apps/u2f-zero/firmware/inc/config/efm8_config.h /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Device/EFM8UB1/inc/SI_EFM8UB1_Defs.h
src/eeprom.OBJ: /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Device/EFM8UB1/inc/SI_EFM8UB1_Register_Enums.h /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Device/shared/si8051Base/stdint.h /home/pp/apps/u2f-zero/firmware/inc/eeprom.h /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Device/EFM8UB1/inc/SI_EFM8UB1_Defs.h /home/pp/apps/u2f-zero/firmware/inc/app.h /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Device/shared/si8051Base/si_toolchain.h /home/pp/apps/u2f-zero/firmware/inc/u2f_hid.h /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Device/shared/si8051Base/stdbool.h /home/pp/apps/u2f-zero/firmware/inc/descriptors.h /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Device/shared/si8051Base/endian.h /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Lib/efm8_usb/inc/efm8_usb.h /home/pp/apps/u2f-zero/firmware/inc/config/usbconfig.h /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Device/EFM8UB1/peripheral_driver/inc/usb_0.h /home/pp/apps/u2f-zero/firmware/inc/config/efm8_config.h
src/i2c.OBJ: /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Device/EFM8UB1/inc/SI_EFM8UB1_Register_Enums.h /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Device/shared/si8051Base/stdint.h /home/pp/apps/u2f-zero/firmware/inc/i2c.h /home/pp/apps/u2f-zero/firmware/inc/bsp.h /home/pp/apps/u2f-zero/firmware/inc/app.h /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Device/EFM8UB1/inc/SI_EFM8UB1_Defs.h /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Lib/efm8_usb/inc/efm8_usb.h /home/pp/apps/u2f-zero/firmware/inc/descriptors.h /home/pp/apps/u2f-zero/firmware/inc/u2f_hid.h /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Device/shared/si8051Base/si_toolchain.h /home/pp/apps/u2f-zero/firmware/inc/config/usbconfig.h /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Device/shared/si8051Base/stdbool.h /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Device/EFM8UB1/peripheral_driver/inc/usb_0.h /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Device/shared/si8051Base/endian.h /home/pp/apps/u2f-zero/firmware/inc/config/efm8_config.h
src/idle.OBJ: /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Device/shared/si8051Base/si_toolchain.h /home/pp/apps/u2f-zero/firmware/inc/idle.h /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Device/shared/si8051Base/stdint.h /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Device/shared/si8051Base/stdbool.h
src/main.OBJ: /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Device/EFM8UB1/inc/SI_EFM8UB1_Register_Enums.h /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Lib/efm8_usb/inc/efm8_usb.h /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Device/EFM8UB1/peripheral_driver/inc/usb_0.h /home/pp/apps/u2f-zero/firmware/inc/atecc508a.h /home/pp/apps/u2f-zero/firmware/inc/InitDevice.h /home/pp/apps/u2f-zero/firmware/inc/descriptors.h /home/pp/apps/u2f-zero/firmware/inc/eeprom.h /home/pp/apps/u2f-zero/firmware/inc/idle.h /home/pp/apps/u2f-zero/firmware/inc/bsp.h /home/pp/apps/u2f-zero/firmware/inc/app.h /home/pp/apps/u2f-zero/firmware/inc/i2c.h /home/pp/apps/u2f-zero/firmware/inc/u2f_hid.h /home/pp/apps/u2f-zero/firmware/inc/u2f.h /home/pp/apps/u2f-zero/firmware/tests/tests.h /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Device/EFM8UB1/inc/SI_EFM8UB1_Defs.h /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Device/shared/si8051Base/si_toolchain.h /home/pp/apps/u2f-zero/firmware/inc/config/usbconfig.h /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Device/shared/si8051Base/stdbool.h /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Device/shared/si8051Base/stdint.h /home/pp/apps/u2f-zero/firmware/inc/config/efm8_config.h /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Device/shared/si8051Base/endian.h
src/u2f-atecc.OBJ: /home/pp/apps/u2f-zero/firmware/inc/app.h /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Device/EFM8UB1/inc/SI_EFM8UB1_Register_Enums.h /home/pp/apps/u2f-zero/firmware/inc/u2f_hid.h /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Device/EFM8UB1/inc/SI_EFM8UB1_Defs.h /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Device/shared/si8051Base/stdint.h /home/pp/apps/u2f-zero/firmware/inc/descriptors.h /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Device/shared/si8051Base/si_toolchain.h /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Device/shared/si8051Base/endian.h /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Lib/efm8_usb/inc/efm8_usb.h /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Device/shared/si8051Base/stdbool.h /home/pp/apps/u2f-zero/firmware/inc/config/usbconfig.h /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Device/EFM8UB1/peripheral_driver/inc/usb_0.h /home/pp/apps/u2f-zero/firmware/inc/config/efm8_config.h
src/u2f-atecc.OBJ: /home/pp/apps/u2f-zero/firmware/inc/app.h /home/pp/apps/u2f-zero/firmware/inc/bsp.h /home/pp/apps/u2f-zero/firmware/inc/u2f.h /home/pp/apps/u2f-zero/firmware/inc/u2f_hid.h /home/pp/apps/u2f-zero/firmware/inc/eeprom.h /home/pp/apps/u2f-zero/firmware/inc/atecc508a.h /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Device/EFM8UB1/inc/SI_EFM8UB1_Register_Enums.h /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Lib/efm8_usb/inc/efm8_usb.h /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Device/shared/si8051Base/stdint.h /home/pp/apps/u2f-zero/firmware/inc/descriptors.h /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Device/EFM8UB1/inc/SI_EFM8UB1_Defs.h /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Device/shared/si8051Base/si_toolchain.h /home/pp/apps/u2f-zero/firmware/inc/config/usbconfig.h /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Device/shared/si8051Base/stdbool.h /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Device/EFM8UB1/peripheral_driver/inc/usb_0.h /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Device/shared/si8051Base/endian.h /home/pp/apps/u2f-zero/firmware/inc/config/efm8_config.h
src/u2f.OBJ: /home/pp/apps/u2f-zero/firmware/inc/app.h /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Device/EFM8UB1/inc/SI_EFM8UB1_Register_Enums.h /home/pp/apps/u2f-zero/firmware/inc/u2f_hid.h /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Device/EFM8UB1/inc/SI_EFM8UB1_Defs.h /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Device/shared/si8051Base/stdint.h /home/pp/apps/u2f-zero/firmware/inc/descriptors.h /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Device/shared/si8051Base/si_toolchain.h /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Device/shared/si8051Base/endian.h /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Lib/efm8_usb/inc/efm8_usb.h /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Device/shared/si8051Base/stdbool.h /home/pp/apps/u2f-zero/firmware/inc/config/usbconfig.h /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Device/EFM8UB1/peripheral_driver/inc/usb_0.h /home/pp/apps/u2f-zero/firmware/inc/config/efm8_config.h
src/u2f.OBJ: /home/pp/apps/u2f-zero/firmware/inc/app.h /home/pp/apps/u2f-zero/firmware/inc/bsp.h /home/pp/apps/u2f-zero/firmware/inc/u2f.h /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Device/EFM8UB1/inc/SI_EFM8UB1_Register_Enums.h /home/pp/apps/u2f-zero/firmware/inc/u2f_hid.h /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Lib/efm8_usb/inc/efm8_usb.h /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Device/shared/si8051Base/stdint.h /home/pp/apps/u2f-zero/firmware/inc/descriptors.h /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Device/EFM8UB1/inc/SI_EFM8UB1_Defs.h /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Device/shared/si8051Base/si_toolchain.h /home/pp/apps/u2f-zero/firmware/inc/config/usbconfig.h /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Device/shared/si8051Base/stdbool.h /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Device/EFM8UB1/peripheral_driver/inc/usb_0.h /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Device/shared/si8051Base/endian.h /home/pp/apps/u2f-zero/firmware/inc/config/efm8_config.h
src/u2f_hid.OBJ: /home/pp/apps/u2f-zero/firmware/inc/app.h /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Device/shared/si8051Base/stdint.h /home/pp/apps/u2f-zero/firmware/inc/bsp.h /home/pp/apps/u2f-zero/firmware/inc/u2f_hid.h /home/pp/apps/u2f-zero/firmware/inc/u2f.h /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Device/EFM8UB1/inc/SI_EFM8UB1_Register_Enums.h /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Lib/efm8_usb/inc/efm8_usb.h /home/pp/apps/u2f-zero/firmware/inc/descriptors.h /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Device/EFM8UB1/inc/SI_EFM8UB1_Defs.h /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Device/shared/si8051Base/si_toolchain.h /home/pp/apps/u2f-zero/firmware/inc/config/usbconfig.h /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Device/shared/si8051Base/stdbool.h /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Device/EFM8UB1/peripheral_driver/inc/usb_0.h /home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/Device/shared/si8051Base/endian.h /home/pp/apps/u2f-zero/firmware/inc/config/efm8_config.h

Plik binarny nie jest wyświetlany.

Wyświetl plik

@ -1 +1 @@
"/home/pp/apps/u2f-zero/firmware/src/u2f-atecc.c" OMF2 LARGE DEBUG OBJECTEXTEND ROM(LARGE) WARNINGLEVEL (2) FLOATFUZZY(3) OPTIMIZE(9,SIZE) INTVECTOR(0x0000) INTPROMOTE INCDIR(/home/pp/apps/u2f-zero/firmware/inc/config;/home/pp/apps/u2f-zero/firmware/inc;/home/pp/apps/u2f-zero/firmware/tinyprintf;/home/pp/apps/u2f-zero/firmware/tests;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/shared/si8051Base;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_usb/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/peripheral_driver/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_assert) REGFILE (u2f-firmware.ORC) PRINT(.\src/u2f-atecc.lst) COND PAGEWIDTH (120) PAGELENGTH (65) OBJECT(.\src/u2f-atecc.OBJ)
"/home/pp/apps/u2f-zero/firmware/src/u2f-atecc.c" OMF2 LARGE DEBUG OBJECTEXTEND ROM(LARGE) WARNINGLEVEL (2) FLOATFUZZY(3) OPTIMIZE(9,SIZE) INTVECTOR(0x0000) INTPROMOTE INCDIR(/home/pp/apps/u2f-zero/firmware/inc/config;/home/pp/apps/u2f-zero/firmware/inc;/home/pp/apps/u2f-zero/firmware/tests;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/shared/si8051Base;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_usb/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/peripheral_driver/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_assert) REGFILE (u2f-firmware.ORC) PRINT(.\src/u2f-atecc.lst) COND PAGEWIDTH (120) PAGELENGTH (65) OBJECT(.\src/u2f-atecc.OBJ)

Wyświetl plik

@ -1,4 +1,4 @@
C51 COMPILER V9.53.0.0 U2F_ATECC 03/28/2016 20:18:26 PAGE 1
C51 COMPILER V9.53.0.0 U2F_ATECC 03/29/2016 00:06:39 PAGE 1
C51 COMPILER V9.53.0.0, COMPILATION OF MODULE U2F_ATECC
@ -6,12 +6,12 @@ OBJECT MODULE PLACED IN .\src/u2f-atecc.OBJ
COMPILER INVOKED BY: Z:\home\pp\SimplicityStudio_v3\developer\toolchains\keil_8051\9.53\BIN\C51.exe /home/pp/apps/u2f-ze
-ro/firmware/src/u2f-atecc.c OMF2 LARGE DEBUG OBJECTEXTEND ROM(LARGE) WARNINGLEVEL(2) FLOATFUZZY(3) OPTIMIZE(9,SIZE) INTV
-ECTOR(0X0000) INTPROMOTE INCDIR(/home/pp/apps/u2f-zero/firmware/inc/config;/home/pp/apps/u2f-zero/firmware/inc;/home/pp/
-apps/u2f-zero/firmware/tinyprintf;/home/pp/apps/u2f-zero/firmware/tests;/home/pp/SimplicityStudio_v3/developer/sdks/si80
-51/v3//Device/shared/si8051Base;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1;/home/pp/Simplicit
-yStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_
-usb/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/peripheral_driver/inc;/home/pp/SimplicityS
-tudio_v3/developer/sdks/si8051/v3//Lib/efm8_assert) REGFILE(u2f-firmware.ORC) PRINT(.\src/u2f-atecc.lst) COND PAGEWIDTH(
-120) PAGELENGTH(65) OBJECT(.\src/u2f-atecc.OBJ)
-apps/u2f-zero/firmware/tests;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/shared/si8051Base;/home/pp/Si
-mplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device
-/EFM8UB1/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_usb/inc;/home/pp/SimplicityStudio_v3/develo
-per/sdks/si8051/v3//Device/EFM8UB1/peripheral_driver/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8
-_assert) REGFILE(u2f-firmware.ORC) PRINT(.\src/u2f-atecc.lst) COND PAGEWIDTH(120) PAGELENGTH(65) OBJECT(.\src/u2f-atecc.
-OBJ)
line level source
@ -63,7 +63,7 @@ line level source
46 1 }
47
48 void u2f_init()
C51 COMPILER V9.53.0.0 U2F_ATECC 03/28/2016 20:18:26 PAGE 2
C51 COMPILER V9.53.0.0 U2F_ATECC 03/29/2016 00:06:39 PAGE 2
49 {
50 1 uint8_t i,j;
@ -74,240 +74,260 @@ line level source
55 1 // initialize key handles
56 1 if (key_store.num_keys != U2F_NUM_KEYS)
57 1 {
58 2 u2f_prints("init key handles\r\n");
59 2 key_store.num_keys = U2F_NUM_KEYS;
60 2 key_store.valid_keys = 0;
61 2 key_store.num_issued = 0;
62 2 flush_key_store();
63 2
64 2 for (i=0; i < 2; i++)
65 2 {
66 3 atecc_send_recv(ATECC_CMD_RNG,ATECC_RNG_P1,ATECC_RNG_P2,
67 3 NULL, 0,
68 3 appdata.tmp,
69 3 sizeof(appdata.tmp), &res);
70 3 for (j=0; j < U2F_NUM_KEYS/2; j++) res.buf[j * U2F_KEY_HANDLE_SIZE] = j+1 + i*U2F_NUM_KEYS/2;
71 3 eeprom_write(U2F_KEYS_ADDR + i * (U2F_KEY_HANDLE_SIZE * U2F_NUM_KEYS/2),
72 3 res.buf, U2F_KEY_HANDLE_SIZE * U2F_NUM_KEYS/2);
73 3 }
74 2
75 2 }
76 1 }
77
78 void u2f_response_writeback(uint8_t * buf, uint16_t len)
79 {
80 1 u2f_hid_writeback(buf, len);
81 1 }
82
83 void u2f_response_flush()
84 {
85 1 u2f_hid_flush();
86 1 }
87
88 void u2f_response_start()
89 {
90 1 }
91
92 int8_t u2f_get_user_feedback()
93 {
94 1 return 0;
95 1 }
96
97 static uint8_t shabuf[70];
98 static uint8_t shaoffset = 0;
99 static struct atecc_response res_digest;
100
101 void u2f_sha256_start()
102 {
103 1 shaoffset = 0;
104 1 atecc_send_recv(ATECC_CMD_SHA,
105 1 ATECC_SHA_START, 0,NULL,0,
106 1 appdata.tmp, sizeof(appdata.tmp), NULL);
107 1 }
108
109
110 void u2f_sha256_update(uint8_t * buf, uint8_t len)
111 {
C51 COMPILER V9.53.0.0 U2F_ATECC 03/28/2016 20:18:26 PAGE 3
58 2 key_store.num_keys = U2F_NUM_KEYS;
59 2 key_store.valid_keys = 0;
60 2 key_store.num_issued = 0;
61 2 flush_key_store();
62 2
63 2 for (i=0; i < 2; i++)
64 2 {
65 3 atecc_send_recv(ATECC_CMD_RNG,ATECC_RNG_P1,ATECC_RNG_P2,
66 3 NULL, 0,
67 3 appdata.tmp,
68 3 sizeof(appdata.tmp), &res);
69 3 for (j=0; j < U2F_NUM_KEYS/2; j++) res.buf[j * U2F_KEY_HANDLE_SIZE] = j+1 + i*U2F_NUM_KEYS/2;
70 3 eeprom_write(U2F_KEYS_ADDR + i * (U2F_KEY_HANDLE_SIZE * U2F_NUM_KEYS/2),
71 3 res.buf, U2F_KEY_HANDLE_SIZE * U2F_NUM_KEYS/2);
72 3 }
73 2
74 2 }
75 1 }
76
77 void u2f_response_writeback(uint8_t * buf, uint16_t len)
78 {
79 1 u2f_hid_writeback(buf, len);
80 1 }
81
82 void u2f_response_flush()
83 {
84 1 u2f_hid_flush();
85 1 }
86
87 void u2f_response_start()
88 {
89 1 }
90
91 int8_t u2f_get_user_feedback()
92 {
93 1 uint32_t t = get_ms();
94 1 while(!U2F_BUTTON_IS_PRESSED())
95 1 {
96 2 // turn yellow
97 2 rgb(128,128,0);
98 2 if (get_ms() - t > 10000)
99 2 break;
100 2 }
101 1
102 1 if (U2F_BUTTON_IS_PRESSED())
103 1 {
104 2 rgb(0,150,128);
105 2 }
106 1 else
107 1 {
108 2 rgb(200,0,0);
109 2 return 1;
110 2 }
111 1
C51 COMPILER V9.53.0.0 U2F_ATECC 03/29/2016 00:06:39 PAGE 3
112 1 uint8_t i = 0;
113 1 while(len--)
114 1 {
115 2 shabuf[shaoffset++] = *buf++;
116 2 if (shaoffset == 64)
117 2 {
118 3 atecc_send_recv(ATECC_CMD_SHA,
119 3 ATECC_SHA_UPDATE, 64,shabuf,64,
120 3 appdata.tmp, sizeof(appdata.tmp), NULL);
121 3 shaoffset = 0;
122 3 }
123 2 }
124 1 }
125
112 1 return 0;
113 1 }
114
115 static uint8_t shabuf[70];
116 static uint8_t shaoffset = 0;
117 static struct atecc_response res_digest;
118
119 void u2f_sha256_start()
120 {
121 1 shaoffset = 0;
122 1 atecc_send_recv(ATECC_CMD_SHA,
123 1 ATECC_SHA_START, 0,NULL,0,
124 1 appdata.tmp, sizeof(appdata.tmp), NULL);
125 1 }
126
127 void u2f_sha256_finish()
128 {
129 1 atecc_send_recv(ATECC_CMD_SHA,
130 1 ATECC_SHA_END, shaoffset,shabuf,shaoffset,
131 1 shabuf, sizeof(shabuf), &res_digest);
132 1 }
133
134
135 int8_t u2f_ecdsa_sign(uint8_t * dest, uint8_t * handle)
136 {
137 1 struct atecc_response res;
138 1 struct key_handle k;
139 1 uint16_t keyslot = (uint16_t)((struct key_handle *)handle)->index;
140 1 if (keyslot > U2F_NUM_KEYS)
141 1 {
142 2 return -1;
143 2 }
144 1 if (keyslot == 0)
145 1 {
146 2 keyslot = U2F_ATTESTATION_KEY_SLOT;
147 2 }
148 1 else
149 1 {
150 2 keyslot--;
151 2 }
152 1
153 1 atecc_send_recv(ATECC_CMD_SIGN,
154 1 ATECC_SIGN_EXTERNAL, keyslot, NULL, 0,
155 1 appdata.tmp, sizeof(appdata.tmp), &res);
156 1
157 1 if (keyslot != U2F_ATTESTATION_KEY_SLOT)
158 1 {
159 2 eeprom_read(U2F_KEY_ADDR(keyslot), (uint8_t* )&k, U2F_KEY_HANDLE_SIZE);
160 2
161 2 if (
162 2 ((struct key_handle *)handle)->index != k.index ||
163 2 ((struct key_handle *)handle)->entropy[0] != k.entropy[0] ||
164 2 ((struct key_handle *)handle)->entropy[1] != k.entropy[1] ||
165 2 ((struct key_handle *)handle)->entropy[2] != k.entropy[2]
166 2 )
167 2 {
168 3 return -1;
169 3 }
170 2 }
171 1
172 1 memmove(dest, res.buf, 64);
173 1
174 1 return 0;
C51 COMPILER V9.53.0.0 U2F_ATECC 03/28/2016 20:18:26 PAGE 4
127
128 void u2f_sha256_update(uint8_t * buf, uint8_t len)
129 {
130 1 uint8_t i = 0;
131 1 while(len--)
132 1 {
133 2 shabuf[shaoffset++] = *buf++;
134 2 if (shaoffset == 64)
135 2 {
136 3 atecc_send_recv(ATECC_CMD_SHA,
137 3 ATECC_SHA_UPDATE, 64,shabuf,64,
138 3 appdata.tmp, sizeof(appdata.tmp), NULL);
139 3 shaoffset = 0;
140 3 }
141 2 }
142 1 }
143
144
145 void u2f_sha256_finish()
146 {
147 1 atecc_send_recv(ATECC_CMD_SHA,
148 1 ATECC_SHA_END, shaoffset,shabuf,shaoffset,
149 1 shabuf, sizeof(shabuf), &res_digest);
150 1 }
151
152
153 int8_t u2f_ecdsa_sign(uint8_t * dest, uint8_t * handle)
154 {
155 1 struct atecc_response res;
156 1 struct key_handle k;
157 1 uint16_t keyslot = (uint16_t)((struct key_handle *)handle)->index;
158 1 if (keyslot > U2F_NUM_KEYS)
159 1 {
160 2 return -1;
161 2 }
162 1 if (keyslot == 0)
163 1 {
164 2 keyslot = U2F_ATTESTATION_KEY_SLOT;
165 2 }
166 1 else
167 1 {
168 2 keyslot--;
169 2 }
170 1
171 1 atecc_send_recv(ATECC_CMD_SIGN,
172 1 ATECC_SIGN_EXTERNAL, keyslot, NULL, 0,
173 1 appdata.tmp, sizeof(appdata.tmp), &res);
174 1
C51 COMPILER V9.53.0.0 U2F_ATECC 03/29/2016 00:06:39 PAGE 4
175 1 }
176
177 // bad if this gets interrupted
178 int8_t u2f_new_keypair(uint8_t * handle, uint8_t * pubkey)
179 {
180 1 struct atecc_response res;
181 1 struct key_handle k;
182 1 uint8_t keyslot = key_store.num_issued;
183 1 if (keyslot > U2F_NUM_KEYS-1)
184 1 {
185 2 return -1;
186 2 }
187 1
188 1 atecc_send_recv(ATECC_CMD_GENKEY,
189 1 ATECC_GENKEY_PRIVATE, keyslot, NULL, 0,
190 1 appdata.tmp, sizeof(appdata.tmp), &res);
175 1 if (keyslot != U2F_ATTESTATION_KEY_SLOT)
176 1 {
177 2 eeprom_read(U2F_KEY_ADDR(keyslot), (uint8_t* )&k, U2F_KEY_HANDLE_SIZE);
178 2
179 2 if (
180 2 ((struct key_handle *)handle)->index != k.index ||
181 2 ((struct key_handle *)handle)->entropy[0] != k.entropy[0] ||
182 2 ((struct key_handle *)handle)->entropy[1] != k.entropy[1] ||
183 2 ((struct key_handle *)handle)->entropy[2] != k.entropy[2]
184 2 )
185 2 {
186 3 return -1;
187 3 }
188 2 }
189 1
190 1 memmove(dest, res.buf, 64);
191 1
192 1 memmove(pubkey, res.buf, 64);
193 1
194 1 eeprom_read(U2F_KEY_ADDR(keyslot), (uint8_t* )&k, U2F_KEY_HANDLE_SIZE);
195 1 if (k.index-1 != keyslot)
196 1 {
197 2
198 2 k.index = keyslot;
199 2 set_app_error(ERROR_BAD_KEY_STORE);
200 2 }
201 1 memmove(handle, &k, U2F_KEY_HANDLE_SIZE);
202 1 key_store.num_issued++;
203 1 flush_key_store();
204 1
205 1 return 0;
206 1 }
207
208 int8_t u2f_load_key(uint8_t * handle, uint8_t len)
209 {
210 1 struct key_handle k;
211 1 uint8_t keyslot = handle[0]-1;
212 1 if (keyslot >= U2F_NUM_KEYS)
213 1 {
214 2 return -1;
215 2 }
216 1 eeprom_read(U2F_KEY_ADDR(keyslot), (uint8_t* )&k, U2F_KEY_HANDLE_SIZE);
217 1
218 1 if (
219 1 handle[0] != k.index ||
220 1 ((struct key_handle *)handle)->entropy[0] != k.entropy[0] ||
221 1 ((struct key_handle *)handle)->entropy[1] != k.entropy[1] ||
222 1 ((struct key_handle *)handle)->entropy[2] != k.entropy[2]
223 1 )
224 1 {
225 2 return -1;
226 2 }
227 1 return 0;
228 1 }
*** WARNING C280 IN LINE 208 OF /home/pp/apps/u2f-zero/firmware/src/u2f-atecc.c: 'len': unreferenced local variable
229
230 uint32_t u2f_count()
231 {
232 1 struct atecc_response res;
233 1 atecc_send_recv(ATECC_CMD_COUNTER,
234 1 ATECC_COUNTER_INC, ATECC_COUNTER0,NULL,0,
235 1 appdata.tmp, sizeof(appdata.tmp), &res);
236 1 return le32toh(*(uint32_t*)res.buf);
C51 COMPILER V9.53.0.0 U2F_ATECC 03/28/2016 20:18:26 PAGE 5
192 1 return 0;
193 1 }
194
195 // bad if this gets interrupted
196 int8_t u2f_new_keypair(uint8_t * handle, uint8_t * pubkey)
197 {
198 1 struct atecc_response res;
199 1 struct key_handle k;
200 1 uint8_t keyslot = key_store.num_issued;
201 1 if (keyslot > U2F_NUM_KEYS-1)
202 1 {
203 2 return -1;
204 2 }
205 1
206 1 atecc_send_recv(ATECC_CMD_GENKEY,
207 1 ATECC_GENKEY_PRIVATE, keyslot, NULL, 0,
208 1 appdata.tmp, sizeof(appdata.tmp), &res);
209 1
210 1 memmove(pubkey, res.buf, 64);
211 1
212 1 eeprom_read(U2F_KEY_ADDR(keyslot), (uint8_t* )&k, U2F_KEY_HANDLE_SIZE);
213 1 if (k.index-1 != keyslot)
214 1 {
215 2
216 2 k.index = keyslot;
217 2 set_app_error(ERROR_BAD_KEY_STORE);
218 2 }
219 1 memmove(handle, &k, U2F_KEY_HANDLE_SIZE);
220 1 key_store.num_issued++;
221 1 flush_key_store();
222 1
223 1 return 0;
224 1 }
225
226 int8_t u2f_load_key(uint8_t * handle, uint8_t len)
227 {
228 1 struct key_handle k;
229 1 uint8_t keyslot = handle[0]-1;
230 1 if (keyslot >= U2F_NUM_KEYS)
231 1 {
232 2 return -1;
233 2 }
234 1 eeprom_read(U2F_KEY_ADDR(keyslot), (uint8_t* )&k, U2F_KEY_HANDLE_SIZE);
235 1
236 1 if (
237 1 handle[0] != k.index ||
C51 COMPILER V9.53.0.0 U2F_ATECC 03/29/2016 00:06:39 PAGE 5
237 1 }
238
239 code char __attest[] =
240 // {{{
241 "\x30\x82\x01\x5a\x30\x82\x01\x00\x02\x01\x01\x30\x0a\x06\x08\x2a\x86\x48\xce\x3d"
242 "\x04\x03\x02\x30\x39\x31\x0b\x30\x09\x06\x03\x55\x04\x06\x13\x02\x56\x41\x31\x14"
243 "\x30\x12\x06\x03\x55\x04\x0a\x13\x0b\x43\x6f\x6e\x6f\x72\x43\x6f\x20\x4c\x4c\x43"
244 "\x31\x14\x30\x12\x06\x03\x55\x04\x03\x13\x0b\x75\x32\x66\x7a\x65\x72\x6f\x2e\x63"
245 "\x6f\x6d\x30\x1e\x17\x0d\x31\x36\x30\x33\x32\x39\x30\x30\x31\x37\x30\x35\x5a\x17"
246 "\x0d\x32\x32\x30\x33\x32\x38\x30\x30\x31\x37\x30\x35\x5a\x30\x39\x31\x0b\x30\x09"
247 "\x06\x03\x55\x04\x06\x13\x02\x56\x41\x31\x14\x30\x12\x06\x03\x55\x04\x0a\x13\x0b"
248 "\x43\x6f\x6e\x6f\x72\x43\x6f\x20\x4c\x4c\x43\x31\x14\x30\x12\x06\x03\x55\x04\x03"
249 "\x13\x0b\x75\x32\x66\x7a\x65\x72\x6f\x2e\x63\x6f\x6d\x30\x59\x30\x13\x06\x07\x2a"
250 "\x86\x48\xce\x3d\x02\x01\x06\x08\x2a\x86\x48\xce\x3d\x03\x01\x07\x03\x42\x00\x04"
251 "\x49\xc0\x88\x08\xf6\xff\xe0\x1f\xa3\xe0\x28\x28\xfb\x22\x1b\x20\xc0\xa4\xa3\x95"
252 "\xba\xdc\xeb\xcf\xbd\x27\x45\xaa\xa5\x2f\x1f\x19\x6c\xfa\xe0\x0d\xdd\xc0\xef\x5d"
253 "\x1e\xc1\x4d\x4b\x9a\x74\xb4\x30\x81\xfa\x93\x39\x0d\xc9\x35\xbd\xea\xce\x6a\x9b"
254 "\x53\xa3\x3e\xbc\x30\x0a\x06\x08\x2a\x86\x48\xce\x3d\x04\x03\x02\x03\x48\x00\x30"
255 "\x45\x02\x21\x00\xb4\xc1\xbc\x9c\x5c\x90\xab\xbf\x34\x29\x40\xf7\xe9\x4f\xb2\x4e"
256 "\x74\x4b\x0a\x0d\x5c\x71\x0d\x7c\xd3\xa7\x9a\x13\x2d\xca\x2d\x10\x02\x20\x3f\x4c"
257 "\x60\x70\x15\x2a\xc0\x1a\xc3\xad\xa3\x4b\x13\x24\x1c\x8d\x78\xa4\xcb\x34\xa7\xbc"
258 "\x21\xe2\xdf\x20\x4f\xb1\x85\x92\xdc\x6a"
259
260 // }}}
261 ;
262 uint8_t * u2f_get_attestation_cert()
263 {
264 1 return __attest;
265 1 }
266
267
268 uint16_t u2f_attestation_cert_size()
269 {
270 1 return sizeof(__attest)-1;
271 1 }
272
273 void set_response_length(uint16_t len)
274 {
275 1 u2f_hid_set_len(len);
276 1 }
238 1 ((struct key_handle *)handle)->entropy[0] != k.entropy[0] ||
239 1 ((struct key_handle *)handle)->entropy[1] != k.entropy[1] ||
240 1 ((struct key_handle *)handle)->entropy[2] != k.entropy[2]
241 1 )
242 1 {
243 2 return -1;
244 2 }
245 1 return 0;
246 1 }
*** WARNING C280 IN LINE 226 OF /home/pp/apps/u2f-zero/firmware/src/u2f-atecc.c: 'len': unreferenced local variable
247
248 uint32_t u2f_count()
249 {
250 1 struct atecc_response res;
251 1 atecc_send_recv(ATECC_CMD_COUNTER,
252 1 ATECC_COUNTER_INC, ATECC_COUNTER0,NULL,0,
253 1 appdata.tmp, sizeof(appdata.tmp), &res);
254 1 return le32toh(*(uint32_t*)res.buf);
255 1 }
256
257 code char __attest[] =
258 // {{{
259 "\x30\x82\x01\x5a\x30\x82\x01\x00\x02\x01\x01\x30\x0a\x06\x08\x2a\x86\x48\xce\x3d"
260 "\x04\x03\x02\x30\x39\x31\x0b\x30\x09\x06\x03\x55\x04\x06\x13\x02\x56\x41\x31\x14"
261 "\x30\x12\x06\x03\x55\x04\x0a\x13\x0b\x43\x6f\x6e\x6f\x72\x43\x6f\x20\x4c\x4c\x43"
262 "\x31\x14\x30\x12\x06\x03\x55\x04\x03\x13\x0b\x75\x32\x66\x7a\x65\x72\x6f\x2e\x63"
263 "\x6f\x6d\x30\x1e\x17\x0d\x31\x36\x30\x33\x32\x39\x30\x34\x30\x36\x33\x35\x5a\x17"
264 "\x0d\x32\x32\x30\x33\x32\x38\x30\x34\x30\x36\x33\x35\x5a\x30\x39\x31\x0b\x30\x09"
265 "\x06\x03\x55\x04\x06\x13\x02\x56\x41\x31\x14\x30\x12\x06\x03\x55\x04\x0a\x13\x0b"
266 "\x43\x6f\x6e\x6f\x72\x43\x6f\x20\x4c\x4c\x43\x31\x14\x30\x12\x06\x03\x55\x04\x03"
267 "\x13\x0b\x75\x32\x66\x7a\x65\x72\x6f\x2e\x63\x6f\x6d\x30\x59\x30\x13\x06\x07\x2a"
268 "\x86\x48\xce\x3d\x02\x01\x06\x08\x2a\x86\x48\xce\x3d\x03\x01\x07\x03\x42\x00\x04"
269 "\xa6\x03\x66\x51\x15\xdc\xeb\xf5\xb8\xdb\x32\xe7\x66\x5e\xf6\x6a\x39\xbc\x15\x37"
270 "\x8c\x65\x5f\xeb\xd4\x8b\xa9\x51\xee\x61\x02\xc2\xc8\x32\x1e\x73\xb2\x7d\xe8\x09"
271 "\x79\xda\xf9\xd1\x42\x48\xe8\x1f\x0b\x43\xae\x63\x99\xf2\x52\x83\x81\x5f\x87\x74"
272 "\x79\x17\x84\x1f\x30\x0a\x06\x08\x2a\x86\x48\xce\x3d\x04\x03\x02\x03\x48\x00\x30"
273 "\x45\x02\x21\x00\x8b\xb7\xfa\xa2\x02\xb7\x24\xa3\x8d\xca\xab\x74\x44\xc3\x4c\xdc"
274 "\x80\x3a\xa5\x67\xdb\x36\xa1\x41\xda\xd6\xf3\x94\x38\x4c\xb6\xbd\x02\x20\x1f\x33"
275 "\x7e\xa3\x46\xf4\x77\x75\xe9\xe5\x4a\xe5\x92\x18\x4a\x11\xc0\x0b\x3c\x13\xa3\x61"
276 "\x68\x68\xae\x90\xbc\x01\xdd\x32\x8d\xe0"
277
278 #endif
278 // }}}
279 ;
280 uint8_t * u2f_get_attestation_cert()
281 {
282 1 return __attest;
283 1 }
284
285
286 uint16_t u2f_attestation_cert_size()
287 {
288 1 return sizeof(__attest)-1;
289 1 }
290
291 void set_response_length(uint16_t len)
292 {
293 1 u2f_hid_set_len(len);
294 1 }
295
296 #endif
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 1082 ----
CONSTANT SIZE = 370 ----
XDATA SIZE = 147 54
C51 COMPILER V9.53.0.0 U2F_ATECC 03/29/2016 00:06:39 PAGE 6
CODE SIZE = 1164 ----
CONSTANT SIZE = 351 ----
XDATA SIZE = 147 58
PDATA SIZE = ---- ----
DATA SIZE = ---- ----
IDATA SIZE = ---- ----

Plik binarny nie jest wyświetlany.

Wyświetl plik

@ -1 +1 @@
"/home/pp/apps/u2f-zero/firmware/src/u2f.c" OMF2 LARGE DEBUG OBJECTEXTEND ROM(LARGE) WARNINGLEVEL (2) FLOATFUZZY(3) OPTIMIZE(9,SIZE) INTVECTOR(0x0000) INTPROMOTE INCDIR(/home/pp/apps/u2f-zero/firmware/inc/config;/home/pp/apps/u2f-zero/firmware/inc;/home/pp/apps/u2f-zero/firmware/tinyprintf;/home/pp/apps/u2f-zero/firmware/tests;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/shared/si8051Base;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_usb/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/peripheral_driver/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_assert) REGFILE (u2f-firmware.ORC) PRINT(.\src/u2f.lst) COND PAGEWIDTH (120) PAGELENGTH (65) OBJECT(.\src/u2f.OBJ)
"/home/pp/apps/u2f-zero/firmware/src/u2f.c" OMF2 LARGE DEBUG OBJECTEXTEND ROM(LARGE) WARNINGLEVEL (2) FLOATFUZZY(3) OPTIMIZE(9,SIZE) INTVECTOR(0x0000) INTPROMOTE INCDIR(/home/pp/apps/u2f-zero/firmware/inc/config;/home/pp/apps/u2f-zero/firmware/inc;/home/pp/apps/u2f-zero/firmware/tests;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/shared/si8051Base;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_usb/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/peripheral_driver/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_assert) REGFILE (u2f-firmware.ORC) PRINT(.\src/u2f.lst) COND PAGEWIDTH (120) PAGELENGTH (65) OBJECT(.\src/u2f.OBJ)

Wyświetl plik

@ -1,4 +1,4 @@
C51 COMPILER V9.53.0.0 U2F 03/28/2016 20:18:26 PAGE 1
C51 COMPILER V9.53.0.0 U2F 03/29/2016 00:06:40 PAGE 1
C51 COMPILER V9.53.0.0, COMPILATION OF MODULE U2F
@ -6,12 +6,11 @@ OBJECT MODULE PLACED IN .\src/u2f.OBJ
COMPILER INVOKED BY: Z:\home\pp\SimplicityStudio_v3\developer\toolchains\keil_8051\9.53\BIN\C51.exe /home/pp/apps/u2f-ze
-ro/firmware/src/u2f.c OMF2 LARGE DEBUG OBJECTEXTEND ROM(LARGE) WARNINGLEVEL(2) FLOATFUZZY(3) OPTIMIZE(9,SIZE) INTVECTOR(
-0X0000) INTPROMOTE INCDIR(/home/pp/apps/u2f-zero/firmware/inc/config;/home/pp/apps/u2f-zero/firmware/inc;/home/pp/apps/u
-2f-zero/firmware/tinyprintf;/home/pp/apps/u2f-zero/firmware/tests;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3/
-/Device/shared/si8051Base;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1;/home/pp/SimplicityStudi
-o_v3/developer/sdks/si8051/v3//Device/EFM8UB1/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_usb/in
-c;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/peripheral_driver/inc;/home/pp/SimplicityStudio_
-v3/developer/sdks/si8051/v3//Lib/efm8_assert) REGFILE(u2f-firmware.ORC) PRINT(.\src/u2f.lst) COND PAGEWIDTH(120) PAGELEN
-GTH(65) OBJECT(.\src/u2f.OBJ)
-2f-zero/firmware/tests;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/shared/si8051Base;/home/pp/Simplici
-tyStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8U
-B1/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_usb/inc;/home/pp/SimplicityStudio_v3/developer/sd
-ks/si8051/v3//Device/EFM8UB1/peripheral_driver/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_asser
-t) REGFILE(u2f-firmware.ORC) PRINT(.\src/u2f.lst) COND PAGEWIDTH(120) PAGELENGTH(65) OBJECT(.\src/u2f.OBJ)
line level source
@ -63,9 +62,9 @@ line level source
46 2 }
47 1 u2f_response_writeback((uint8_t*)rcode,2);
48 1 u2f_response_flush();
C51 COMPILER V9.53.0.0 U2F 03/28/2016 20:18:26 PAGE 2
49 1 }
C51 COMPILER V9.53.0.0 U2F 03/29/2016 00:06:40 PAGE 2
50
51 static uint8_t get_signature_length(uint8_t * sig)
52 {
@ -120,102 +119,108 @@ line level source
101 2 return U2F_SW_CONDITIONS_NOT_SATISFIED;
102 2 }
103 1
104 1 count = u2f_count();
105 1
106 1 u2f_sha256_start();
107 1 u2f_sha256_update(req->app,32);
108 1 u2f_sha256_update(&up,1);
109 1 u2f_sha256_update(&count,4);
*** WARNING C182 IN LINE 109 OF /home/pp/apps/u2f-zero/firmware/src/u2f.c: pointer to different objects
110 1 u2f_sha256_update(req->chal,32);
C51 COMPILER V9.53.0.0 U2F 03/28/2016 20:18:26 PAGE 3
104 1 if (u2f_get_user_feedback())
105 1 {
106 2 u2f_hid_set_len(2);
107 2 return U2F_SW_CONDITIONS_NOT_SATISFIED;
108 2 }
109 1
110 1 count = u2f_count();
111 1
112 1 u2f_sha256_finish();
113 1
114 1 if (u2f_ecdsa_sign((uint8_t*)req, req->kh) == -1)
115 1 {
116 2 return U2F_SW_WRONG_DATA;
117 2 }
118 1
119 1 u2f_hid_set_len(7 + get_signature_length((uint8_t*)req));
120 1
121 1 u2f_response_writeback(&up,1);
122 1 u2f_response_writeback(&count,4);
*** WARNING C182 IN LINE 122 OF /home/pp/apps/u2f-zero/firmware/src/u2f.c: pointer to different objects
123 1 dump_signature_der((uint8_t*)req);
124 1
125 1 return U2F_SW_NO_ERROR;
126 1 }
127
128 static int16_t u2f_register(struct u2f_register_request * req)
129 {
130 1 uint8_t i[] = {0x0,U2F_EC_FMT_UNCOMPRESSED};
131 1
132 1 uint8_t key_handle[U2F_KEY_HANDLE_SIZE];
133 1 uint8_t pubkey[64];
134 1
135 1
136 1 const uint16_t attest_size = u2f_attestation_cert_size();
137 1
138 1 if (u2f_get_user_feedback() != 0)
139 1 {
140 2 return U2F_SW_CONDITIONS_NOT_SATISFIED;
141 2 }
142 1
143 1 if ( u2f_new_keypair(key_handle, pubkey) == -1)
144 1 {
145 2 return U2F_SW_CONDITIONS_NOT_SATISFIED;
146 2 }
147 1
148 1 u2f_sha256_start();
149 1 u2f_sha256_update(i,1);
150 1 u2f_sha256_update(req->app,32);
151 1
152 1 u2f_sha256_update(req->chal,32);
153 1
154 1 u2f_sha256_update(key_handle,U2F_KEY_HANDLE_SIZE);
155 1 u2f_sha256_update(i+1,1);
156 1 u2f_sha256_update(pubkey,64);
157 1 u2f_sha256_finish();
158 1
159 1 if (u2f_ecdsa_sign((uint8_t*)req, U2F_ATTESTATION_HANDLE) == -1)
160 1 {
161 2 return U2F_SW_WRONG_DATA;
162 2 }
163 1
164 1 u2f_hid_set_len(69 + get_signature_length((uint8_t*)req) + U2F_KEY_HANDLE_SIZE + u2f_attestation_cert_
-size());
165 1 i[0] = 0x5;
166 1 u2f_response_writeback(i,2);
167 1 u2f_response_writeback(pubkey,64);
168 1 i[0] = U2F_KEY_HANDLE_SIZE;
169 1 u2f_response_writeback(i,1);
170 1 u2f_response_writeback(key_handle,U2F_KEY_HANDLE_SIZE);
171 1
C51 COMPILER V9.53.0.0 U2F 03/28/2016 20:18:26 PAGE 4
112 1 u2f_sha256_start();
C51 COMPILER V9.53.0.0 U2F 03/29/2016 00:06:40 PAGE 3
172 1 u2f_response_writeback(u2f_get_attestation_cert(),u2f_attestation_cert_size());
173 1
174 1 dump_signature_der((uint8_t*)req);
175 1
176 1
177 1 return U2F_SW_NO_ERROR;
178 1 }
179
180 static int16_t u2f_version()
181 {
182 1 code const char version[] = "U2F_V2";
183 1 u2f_hid_set_len(2 + sizeof(version)-1);
184 1 u2f_response_writeback(version, sizeof(version)-1);
185 1 return U2F_SW_NO_ERROR;
186 1 }
187
188 #endif
113 1 u2f_sha256_update(req->app,32);
114 1 u2f_sha256_update(&up,1);
115 1 u2f_sha256_update(&count,4);
*** WARNING C182 IN LINE 115 OF /home/pp/apps/u2f-zero/firmware/src/u2f.c: pointer to different objects
116 1 u2f_sha256_update(req->chal,32);
117 1
118 1 u2f_sha256_finish();
119 1
120 1 if (u2f_ecdsa_sign((uint8_t*)req, req->kh) == -1)
121 1 {
122 2 return U2F_SW_WRONG_DATA;
123 2 }
124 1
125 1 u2f_hid_set_len(7 + get_signature_length((uint8_t*)req));
126 1
127 1 u2f_response_writeback(&up,1);
128 1 u2f_response_writeback(&count,4);
*** WARNING C182 IN LINE 128 OF /home/pp/apps/u2f-zero/firmware/src/u2f.c: pointer to different objects
129 1 dump_signature_der((uint8_t*)req);
130 1
131 1 return U2F_SW_NO_ERROR;
132 1 }
133
134 static int16_t u2f_register(struct u2f_register_request * req)
135 {
136 1 uint8_t i[] = {0x0,U2F_EC_FMT_UNCOMPRESSED};
137 1
138 1 uint8_t key_handle[U2F_KEY_HANDLE_SIZE];
139 1 uint8_t pubkey[64];
140 1
141 1
142 1 const uint16_t attest_size = u2f_attestation_cert_size();
143 1
144 1 if (u2f_get_user_feedback())
145 1 {
146 2 return U2F_SW_CONDITIONS_NOT_SATISFIED;
147 2 }
148 1
149 1 if ( u2f_new_keypair(key_handle, pubkey) == -1)
150 1 {
151 2 return U2F_SW_CONDITIONS_NOT_SATISFIED;
152 2 }
153 1
154 1 u2f_sha256_start();
155 1 u2f_sha256_update(i,1);
156 1 u2f_sha256_update(req->app,32);
157 1
158 1 u2f_sha256_update(req->chal,32);
159 1
160 1 u2f_sha256_update(key_handle,U2F_KEY_HANDLE_SIZE);
161 1 u2f_sha256_update(i+1,1);
162 1 u2f_sha256_update(pubkey,64);
163 1 u2f_sha256_finish();
164 1
165 1 if (u2f_ecdsa_sign((uint8_t*)req, U2F_ATTESTATION_HANDLE) == -1)
166 1 {
167 2 return U2F_SW_WRONG_DATA;
168 2 }
169 1
170 1 u2f_hid_set_len(69 + get_signature_length((uint8_t*)req) + U2F_KEY_HANDLE_SIZE + u2f_attestation_cert_
-size());
171 1 i[0] = 0x5;
172 1 u2f_response_writeback(i,2);
C51 COMPILER V9.53.0.0 U2F 03/29/2016 00:06:40 PAGE 4
173 1 u2f_response_writeback(pubkey,64);
174 1 i[0] = U2F_KEY_HANDLE_SIZE;
175 1 u2f_response_writeback(i,1);
176 1 u2f_response_writeback(key_handle,U2F_KEY_HANDLE_SIZE);
177 1
178 1 u2f_response_writeback(u2f_get_attestation_cert(),u2f_attestation_cert_size());
179 1
180 1 dump_signature_der((uint8_t*)req);
181 1
182 1
183 1 return U2F_SW_NO_ERROR;
184 1 }
185
186 static int16_t u2f_version()
187 {
188 1 code const char version[] = "U2F_V2";
189 1 u2f_hid_set_len(2 + sizeof(version)-1);
190 1 u2f_response_writeback(version, sizeof(version)-1);
191 1 return U2F_SW_NO_ERROR;
192 1 }
193
194 #endif
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 935 ----
CODE SIZE = 943 ----
CONSTANT SIZE = 103 ----
XDATA SIZE = ---- 97
PDATA SIZE = ---- ----

Plik binarny nie jest wyświetlany.

Wyświetl plik

@ -1 +1 @@
"/home/pp/apps/u2f-zero/firmware/src/u2f_hid.c" OMF2 LARGE DEBUG OBJECTEXTEND ROM(LARGE) WARNINGLEVEL (2) FLOATFUZZY(3) OPTIMIZE(9,SIZE) INTVECTOR(0x0000) INTPROMOTE INCDIR(/home/pp/apps/u2f-zero/firmware/inc/config;/home/pp/apps/u2f-zero/firmware/inc;/home/pp/apps/u2f-zero/firmware/tinyprintf;/home/pp/apps/u2f-zero/firmware/tests;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/shared/si8051Base;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_usb/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/peripheral_driver/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_assert) REGFILE (u2f-firmware.ORC) PRINT(.\src/u2f_hid.lst) COND PAGEWIDTH (120) PAGELENGTH (65) OBJECT(.\src/u2f_hid.OBJ)
"/home/pp/apps/u2f-zero/firmware/src/u2f_hid.c" OMF2 LARGE DEBUG OBJECTEXTEND ROM(LARGE) WARNINGLEVEL (2) FLOATFUZZY(3) OPTIMIZE(9,SIZE) INTVECTOR(0x0000) INTPROMOTE INCDIR(/home/pp/apps/u2f-zero/firmware/inc/config;/home/pp/apps/u2f-zero/firmware/inc;/home/pp/apps/u2f-zero/firmware/tests;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/shared/si8051Base;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_usb/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/peripheral_driver/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_assert) REGFILE (u2f-firmware.ORC) PRINT(.\src/u2f_hid.lst) COND PAGEWIDTH (120) PAGELENGTH (65) OBJECT(.\src/u2f_hid.OBJ)

Wyświetl plik

@ -1,4 +1,4 @@
C51 COMPILER V9.53.0.0 U2F_HID 03/28/2016 20:18:26 PAGE 1
C51 COMPILER V9.53.0.0 U2F_HID 03/29/2016 00:06:40 PAGE 1
C51 COMPILER V9.53.0.0, COMPILATION OF MODULE U2F_HID
@ -6,12 +6,11 @@ OBJECT MODULE PLACED IN .\src/u2f_hid.OBJ
COMPILER INVOKED BY: Z:\home\pp\SimplicityStudio_v3\developer\toolchains\keil_8051\9.53\BIN\C51.exe /home/pp/apps/u2f-ze
-ro/firmware/src/u2f_hid.c OMF2 LARGE DEBUG OBJECTEXTEND ROM(LARGE) WARNINGLEVEL(2) FLOATFUZZY(3) OPTIMIZE(9,SIZE) INTVEC
-TOR(0X0000) INTPROMOTE INCDIR(/home/pp/apps/u2f-zero/firmware/inc/config;/home/pp/apps/u2f-zero/firmware/inc;/home/pp/ap
-ps/u2f-zero/firmware/tinyprintf;/home/pp/apps/u2f-zero/firmware/tests;/home/pp/SimplicityStudio_v3/developer/sdks/si8051
-/v3//Device/shared/si8051Base;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1;/home/pp/SimplicityS
-tudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_us
-b/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/peripheral_driver/inc;/home/pp/SimplicityStu
-dio_v3/developer/sdks/si8051/v3//Lib/efm8_assert) REGFILE(u2f-firmware.ORC) PRINT(.\src/u2f_hid.lst) COND PAGEWIDTH(120)
- PAGELENGTH(65) OBJECT(.\src/u2f_hid.OBJ)
-ps/u2f-zero/firmware/tests;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/shared/si8051Base;/home/pp/Simp
-licityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/E
-FM8UB1/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_usb/inc;/home/pp/SimplicityStudio_v3/develope
-r/sdks/si8051/v3//Device/EFM8UB1/peripheral_driver/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_a
-ssert) REGFILE(u2f-firmware.ORC) PRINT(.\src/u2f_hid.lst) COND PAGEWIDTH(120) PAGELENGTH(65) OBJECT(.\src/u2f_hid.OBJ)
line level source
@ -54,445 +53,451 @@ line level source
37
38 uint32_t last_buffered;
39 uint16_t bytes_buffered;
40
41 // number of payload bytes written in response
42 uint16_t bytes_written;
43
40 uint16_t req_len;
41
42 // number of payload bytes written in response
43 uint16_t bytes_written;
44
45
46 // total length of response in bytes
47 uint16_t res_len;
48
C51 COMPILER V9.53.0.0 U2F_HID 03/28/2016 20:18:26 PAGE 2
46
47 // total length of response in bytes
48 uint16_t res_len;
49
C51 COMPILER V9.53.0.0 U2F_HID 03/29/2016 00:06:40 PAGE 2
49 #define BUFFER_SIZE 150
50 uint8_t buffer[BUFFER_SIZE];
51
50 #define BUFFER_SIZE 200
51 uint8_t buffer[BUFFER_SIZE];
52
53 } hid_layer;
54
55 struct CID CIDS[5];
56 static uint8_t CID_NUM = 0;
57
58 static uint8_t _hid_pkt[HID_PACKET_SIZE];
59 static uint8_t _hid_offset = 0;
60 static uint8_t _hid_seq = 0;
61 static uint8_t _hid_in_session = 0;
62
63 #define u2f_hid_busy() (_hid_in_session)
64
65 #define MIN(a,b) ((a) < (b) ? (a):(b))
66
67 void u2f_hid_init()
68 {
69 1 memset(CIDS, 0, sizeof(CIDS));
70 1 memset(&hid_layer, 0, sizeof(hid_layer));
71 1 CID_NUM = 0;
72 1 _hid_offset = 0;
73 1 _hid_seq = 0;
74 1 _hid_in_session = 0;
75 1 }
76
77 void u2f_hid_set_len(uint16_t len)
78 {
79 1 hid_layer.res_len = len;
80 1 }
81
53
54 } hid_layer;
55
56 struct CID CIDS[5];
57 static uint8_t CID_NUM = 0;
58
59 static uint8_t _hid_pkt[HID_PACKET_SIZE];
60 static uint8_t _hid_offset = 0;
61 static uint8_t _hid_seq = 0;
62 static uint8_t _hid_in_session = 0;
63
64 #define u2f_hid_busy() (_hid_in_session)
65
66 #define MIN(a,b) ((a) < (b) ? (a):(b))
67
68 void u2f_hid_init()
69 {
70 1 memset(CIDS, 0, sizeof(CIDS));
71 1 memset(&hid_layer, 0, sizeof(hid_layer));
72 1 CID_NUM = 0;
73 1 _hid_offset = 0;
74 1 _hid_seq = 0;
75 1 _hid_in_session = 0;
76 1 }
77
78 void u2f_hid_set_len(uint16_t len)
79 {
80 1 hid_layer.res_len = len;
81 1 }
82
83 static void u2f_hid_reset_packet()
84 {
85 1 _hid_seq = 0;
86 1 _hid_offset = 0;
87 1 _hid_in_session = 0;
88 1 memset(&hid_layer, 0, sizeof(hid_layer));
89 1 memset(_hid_pkt, 0, HID_PACKET_SIZE);
90 1 }
91
92 // writes what has been buffered and clears memory
93 void u2f_hid_flush()
94 {
95 1 if (_hid_offset)
96 1 {
97 2 usb_write(_hid_pkt, HID_PACKET_SIZE);
98 2 }
99 1 u2f_hid_reset_packet();
100 1 }
101
83
84 static void u2f_hid_reset_packet()
85 {
86 1 _hid_seq = 0;
87 1 _hid_offset = 0;
88 1 _hid_in_session = 0;
89 1 memset(&hid_layer, 0, sizeof(hid_layer));
90 1 memset(_hid_pkt, 0, HID_PACKET_SIZE);
91 1 }
92
93 // writes what has been buffered and clears memory
94 void u2f_hid_flush()
95 {
96 1 if (_hid_offset)
97 1 {
98 2 usb_write(_hid_pkt, HID_PACKET_SIZE);
99 2 }
100 1 u2f_hid_reset_packet();
101 1 }
102
103 void u2f_hid_writeback(uint8_t * payload, uint16_t len)
104 {
105 1 struct u2f_hid_msg * r = (struct u2f_hid_response *) _hid_pkt;
106 1 _hid_in_session = 1;
107 1 if (_hid_offset == 0)
108 1 {
109 2 r->cid = hid_layer.current_cid;
110 2 if (!_hid_seq)
111 2 {
C51 COMPILER V9.53.0.0 U2F_HID 03/28/2016 20:18:26 PAGE 3
103
104 void u2f_hid_writeback(uint8_t * payload, uint16_t len)
105 {
106 1 struct u2f_hid_msg * r = (struct u2f_hid_response *) _hid_pkt;
107 1 _hid_in_session = 1;
108 1 if (_hid_offset == 0)
109 1 {
110 2 r->cid = hid_layer.current_cid;
111 2 if (!_hid_seq)
112 2 {
C51 COMPILER V9.53.0.0 U2F_HID 03/29/2016 00:06:40 PAGE 3
112 3 r->pkt.init.cmd = hid_layer.current_cmd;
113 3 U2FHID_SET_LEN(r, hid_layer.res_len);
114 3 _hid_offset = 7;
115 3 }
116 2 else
117 2 {
118 3 r->pkt.cont.seq = _hid_seq - 1;
119 3 _hid_offset = 5;
120 3 if (_hid_seq-1 > 127)
121 3 {
122 4 set_app_error(ERROR_SEQ_EXCEEDED);
123 4 return;
124 4 }
125 3 }
126 2 }
127 1 while(len--)
128 1 {
129 2 _hid_pkt[_hid_offset++] = *payload++;
130 2 hid_layer.bytes_written++;
131 2 if (_hid_offset == HID_PACKET_SIZE)
132 2 {
133 3 _hid_offset = 0;
134 3 _hid_seq++;
135 3
136 3 usb_write(_hid_pkt, HID_PACKET_SIZE);
137 3 memset(_hid_pkt, 0, HID_PACKET_SIZE);
138 3
139 3 if (len)
140 3 {
141 4 u2f_hid_writeback(payload, len);
142 4 return;
143 4 }
144 3 else break;
145 3 }
146 2 }
147 1
148 1 }
149
150 static uint8_t is_cid_free(struct CID* c)
151 {
152 1 return (c->cid == 0 || get_ms() - c->last_used > 1000);
153 1 }
154
155 static void refresh_cid(struct CID* c)
156 {
157 1 c->last_used = get_ms();
158 1 }
159
113 3 r->pkt.init.cmd = hid_layer.current_cmd;
114 3 U2FHID_SET_LEN(r, hid_layer.res_len);
115 3 _hid_offset = 7;
116 3 }
117 2 else
118 2 {
119 3 r->pkt.cont.seq = _hid_seq - 1;
120 3 _hid_offset = 5;
121 3 if (_hid_seq-1 > 127)
122 3 {
123 4 set_app_error(ERROR_SEQ_EXCEEDED);
124 4 return;
125 4 }
126 3 }
127 2 }
128 1 while(len--)
129 1 {
130 2 _hid_pkt[_hid_offset++] = *payload++;
131 2 hid_layer.bytes_written++;
132 2 if (_hid_offset == HID_PACKET_SIZE)
133 2 {
134 3 _hid_offset = 0;
135 3 _hid_seq++;
136 3
137 3 usb_write(_hid_pkt, HID_PACKET_SIZE);
138 3 memset(_hid_pkt, 0, HID_PACKET_SIZE);
139 3
140 3 if (len)
141 3 {
142 4 u2f_hid_writeback(payload, len);
143 4 return;
144 4 }
145 3 else break;
146 3 }
147 2 }
148 1
149 1 }
150
151 static uint8_t is_cid_free(struct CID* c)
152 {
153 1 return (c->cid == 0 || get_ms() - c->last_used > 1000);
154 1 }
155
156 static void refresh_cid(struct CID* c)
157 {
158 1 c->last_used = get_ms();
159 1 }
160
161 static uint32_t get_new_cid()
162 {
163 1 static uint32_t base = 0xcafebabe;
164 1 int i;
165 1 for(i = 0; i < CID_MAX; i++)
166 1 {
167 2 if (is_cid_free(CIDS+i))
168 2 {
169 3 goto newcid;
170 3 }
171 2 }
172 1 return 0;
173 1 newcid:
174 1
C51 COMPILER V9.53.0.0 U2F_HID 03/28/2016 20:18:26 PAGE 4
161
162 static uint32_t get_new_cid()
163 {
164 1 static uint32_t base = 0xcafebabe;
165 1 int i;
166 1 for(i = 0; i < CID_MAX; i++)
167 1 {
168 2 if (is_cid_free(CIDS+i))
169 2 {
170 3 goto newcid;
171 3 }
172 2 }
173 1 return 0;
174 1 newcid:
175 1
C51 COMPILER V9.53.0.0 U2F_HID 03/29/2016 00:06:40 PAGE 4
175 1 do
176 1 {
177 2 CIDS[i].cid = base + CID_NUM++;
178 2 }while(CIDS[i].cid == 0 || CIDS[i].cid == U2FHID_BROADCAST);
179 1
180 1 refresh_cid(CIDS+i);
181 1
182 1 return CIDS[i].cid;
183 1 }
184
185 static struct CID* get_cid(uint32_t cid)
186 {
187 1 uint8_t i;
188 1 for(i = 0; i < CID_MAX; i++)
189 1 {
190 2 if (CIDS[i].cid == cid)
191 2 {
192 3 return CIDS+i;
193 3 }
194 2 }
195 1 return NULL;
196 1 }
197 static void del_cid(uint32_t cid)
198 {
199 1 uint8_t i;
200 1 for(i = 0; i < CID_MAX; i++)
201 1 {
202 2 if (CIDS[i].cid == cid)
203 2 {
204 3 CIDS[i].cid = 0;
205 3 }
206 2 }
207 1 }
208
209 static int check_cid(uint32_t cid)
210 {
211 1 return (get_cid(cid) != NULL);
212 1 }
213
214 static void stamp_error(uint32_t cid, uint8_t err)
215 {
216 1 struct u2f_hid_msg * res = (struct u2f_hid_msg *)_hid_pkt;
217 1 res->cid = cid;
218 1 res->pkt.init.cmd = U2FHID_ERROR;
219 1 res->pkt.init.payload[0] = err;
220 1 res->pkt.init.bcnth = 0;
221 1 res->pkt.init.bcntl = 1;
222 1 // TODO this is tramping on potential other response data
223 1 usb_write(_hid_pkt, HID_PACKET_SIZE);
224 1 del_cid(cid);
225 1 }
226
227 // TODO double check if this is really needed
228 static void start_buffering(struct u2f_hid_msg* req)
229 {
230 1 _hid_in_session = 1;
231 1 hid_layer.bytes_buffered = U2FHID_INIT_PAYLOAD_SIZE;
232 1 memmove(hid_layer.buffer, req->pkt.init.payload, U2FHID_INIT_PAYLOAD_SIZE);
233 1 }
234
235 static int buffer_request(struct u2f_hid_msg* req)
236 {
237 1 if (hid_layer.bytes_buffered + U2FHID_CONT_PAYLOAD_SIZE > BUFFER_SIZE)
C51 COMPILER V9.53.0.0 U2F_HID 03/28/2016 20:18:26 PAGE 5
176 1 do
177 1 {
178 2 CIDS[i].cid = base + CID_NUM++;
179 2 }while(CIDS[i].cid == 0 || CIDS[i].cid == U2FHID_BROADCAST);
180 1
181 1 refresh_cid(CIDS+i);
182 1
183 1 return CIDS[i].cid;
184 1 }
185
186 static struct CID* get_cid(uint32_t cid)
187 {
188 1 uint8_t i;
189 1 for(i = 0; i < CID_MAX; i++)
190 1 {
191 2 if (CIDS[i].cid == cid)
192 2 {
193 3 return CIDS+i;
194 3 }
195 2 }
196 1 return NULL;
197 1 }
198 static void del_cid(uint32_t cid)
199 {
200 1 uint8_t i;
201 1 for(i = 0; i < CID_MAX; i++)
202 1 {
203 2 if (CIDS[i].cid == cid)
204 2 {
205 3 CIDS[i].cid = 0;
206 3 }
207 2 }
208 1 }
209
210 static int check_cid(uint32_t cid)
211 {
212 1 return (get_cid(cid) != NULL);
213 1 }
214
215 static void stamp_error(uint32_t cid, uint8_t err)
216 {
217 1 struct u2f_hid_msg * res = (struct u2f_hid_msg *)_hid_pkt;
218 1 res->cid = cid;
219 1 res->pkt.init.cmd = U2FHID_ERROR;
220 1 res->pkt.init.payload[0] = err;
221 1 res->pkt.init.bcnth = 0;
222 1 res->pkt.init.bcntl = 1;
223 1 // TODO this is tramping on potential other response data
224 1 usb_write(_hid_pkt, HID_PACKET_SIZE);
225 1 del_cid(cid);
226 1 }
227
228 // TODO double check if this is really needed
229 static void start_buffering(struct u2f_hid_msg* req)
230 {
231 1 _hid_in_session = 1;
232 1 hid_layer.bytes_buffered = U2FHID_INIT_PAYLOAD_SIZE;
233 1 hid_layer.req_len = U2FHID_LEN(req);
234 1 memmove(hid_layer.buffer, req->pkt.init.payload, U2FHID_INIT_PAYLOAD_SIZE);
235 1 }
236
237 static int buffer_request(struct u2f_hid_msg* req)
238 {
C51 COMPILER V9.53.0.0 U2F_HID 03/29/2016 00:06:40 PAGE 5
238 1 {
239 2 u2f_prints("buffer full\r\n");
240 2 return -1;
241 2 }
242 1 memmove(hid_layer.buffer + hid_layer.bytes_buffered, req->pkt.cont.payload, U2FHID_CONT_PAYLOAD_SIZE);
243 1 hid_layer.bytes_buffered += U2FHID_CONT_PAYLOAD_SIZE;
244 1 }
245
246 static void hid_u2f_parse(struct u2f_hid_msg* req)
247 {
248 1
249 1 uint16_t len = 0;
250 1 struct u2f_hid_init_response * init_res = appdata.tmp;
239 1 if (hid_layer.bytes_buffered + U2FHID_CONT_PAYLOAD_SIZE > BUFFER_SIZE)
240 1 {
241 2 u2f_prints("buffer full\r\n");
242 2 stamp_error(req->cid, ERR_OTHER);
243 2 return -1;
244 2 }
245 1 memmove(hid_layer.buffer + hid_layer.bytes_buffered, req->pkt.cont.payload, U2FHID_CONT_PAYLOAD_SIZE);
246 1 hid_layer.bytes_buffered += U2FHID_CONT_PAYLOAD_SIZE;
247 1 }
248
249 static void hid_u2f_parse(struct u2f_hid_msg* req)
250 {
251 1
252 1 switch(hid_layer.current_cmd)
253 1 {
254 2 case U2FHID_INIT:
255 2 //u2f_printlx("got init packet ",1,req->cid);
256 2 if (U2FHID_LEN(req) != 8)
257 2 {
258 3 // this one is safe
259 3 stamp_error(hid_layer.current_cid, ERR_INVALID_LEN);
260 3 u2f_prints("invalid len init\r\n");
261 3 goto fail;
262 3 }
263 2 u2f_hid_set_len(17);
264 2
265 2 //u2f_printlx("cid: ",1,hid_layer.current_cid);
266 2 if (hid_layer.current_cid == 0)
267 2 {
268 3 u2f_prints("out of cid's\r\n");
269 3 goto fail;
270 3 }
271 2
272 2 init_res->cid = get_new_cid();
273 2 init_res->version_id = 1;
274 2 init_res->version_major = 1;
275 2 init_res->version_minor = 0;
276 2 init_res->version_build = 0;
277 2 init_res->cflags = 0;
278 2
279 2 // write back the same data nonce
280 2 u2f_hid_writeback(req->pkt.init.payload, 8);
281 2 u2f_hid_writeback(init_res, 9);
*** WARNING C182 IN LINE 281 OF /home/pp/apps/u2f-zero/firmware/src/u2f_hid.c: pointer to different objects
282 2 u2f_hid_flush();
283 2 hid_layer.current_cid = init_res->cid;
284 2
285 2 break;
286 2 case U2FHID_MSG:
252 1 uint16_t len = 0;
253 1 struct u2f_hid_init_response * init_res = appdata.tmp;
254 1
255 1 switch(hid_layer.current_cmd)
256 1 {
257 2 case U2FHID_INIT:
258 2 //u2f_printlx("got init packet ",1,req->cid);
259 2 if (U2FHID_LEN(req) != 8)
260 2 {
261 3 // this one is safe
262 3 stamp_error(hid_layer.current_cid, ERR_INVALID_LEN);
263 3 u2f_prints("invalid len init\r\n");
264 3 goto fail;
265 3 }
266 2 u2f_hid_set_len(17);
267 2
268 2 //u2f_printlx("cid: ",1,hid_layer.current_cid);
269 2 if (hid_layer.current_cid == 0)
270 2 {
271 3 u2f_prints("out of cid's\r\n");
272 3 goto fail;
273 3 }
274 2
275 2 init_res->cid = get_new_cid();
276 2 init_res->version_id = 1;
277 2 init_res->version_major = 1;
278 2 init_res->version_minor = 0;
279 2 init_res->version_build = 0;
280 2 init_res->cflags = 0;
281 2
282 2 // write back the same data nonce
283 2 u2f_hid_writeback(req->pkt.init.payload, 8);
284 2 u2f_hid_writeback(init_res, 9);
*** WARNING C182 IN LINE 284 OF /home/pp/apps/u2f-zero/firmware/src/u2f_hid.c: pointer to different objects
285 2 u2f_hid_flush();
286 2 hid_layer.current_cid = init_res->cid;
287 2
288 2 if (U2FHID_LEN(req) < 4)
289 2 {
290 3 // TODO bad
291 3 stamp_error(hid_layer.current_cid, ERR_INVALID_LEN);
292 3 u2f_prints("invalid len msg\r\n");
293 3 goto fail;
294 3 }
295 2 //u2f_prints("U2FHID_MSG\r\n");
296 2 // buffer 2 payloads (120 bytes) to get full U2F message
297 2 // assuming key handle is < 45 bytes
298 2 // 7 bytes for apdu header
299 2 // 7 + 66 bytes + key handle for authenticate message
C51 COMPILER V9.53.0.0 U2F_HID 03/28/2016 20:18:26 PAGE 6
288 2 break;
289 2 case U2FHID_MSG:
290 2
291 2 if (U2FHID_LEN(req) < 4)
292 2 {
293 3 // TODO bad
294 3 stamp_error(hid_layer.current_cid, ERR_INVALID_LEN);
295 3 u2f_prints("invalid len msg\r\n");
296 3 goto fail;
297 3 }
298 2 //u2f_prints("U2FHID_MSG\r\n");
299 2 // buffer 2 payloads (120 bytes) to get full U2F message
300 2 // assuming key handle is < 45 bytes
C51 COMPILER V9.53.0.0 U2F_HID 03/29/2016 00:06:40 PAGE 6
300 2 // 7 + 64 for register message
301 2 if (hid_layer.bytes_buffered == 0)
302 2 {
303 3 start_buffering(req);
304 3 if (hid_layer.bytes_buffered >= U2FHID_LEN(req))
305 3 {
306 4 u2f_request((struct u2f_request_apdu *)hid_layer.buffer);
307 4 }
308 3 }
309 2 else
310 2 {
311 3 buffer_request(req);
312 3 u2f_request((struct u2f_request_apdu *)hid_layer.buffer);
313 3 }
314 2
315 2
316 2 break;
317 2 case U2FHID_PING:
318 2
319 2 //u2f_prints("U2F PING\r\n");
301 2 // 7 bytes for apdu header
302 2 // 7 + 66 bytes + key handle for authenticate message
303 2 // 7 + 64 for register message
304 2 if (hid_layer.bytes_buffered == 0)
305 2 {
306 3 start_buffering(req);
307 3 if (hid_layer.bytes_buffered >= U2FHID_LEN(req))
308 3 {
309 4 u2f_request((struct u2f_request_apdu *)hid_layer.buffer);
310 4 }
311 3 }
312 2 else
313 2 {
314 3 buffer_request(req);
315 3 if (hid_layer.bytes_buffered >= hid_layer.req_len)
316 3 {
317 4 u2f_request((struct u2f_request_apdu *)hid_layer.buffer);
318 4 }
319 3 }
320 2
321 2 if (!u2f_hid_busy())
322 2 {
323 3 u2f_hid_set_len(U2FHID_LEN(req));
324 3 u2f_hid_writeback(req->pkt.init.payload, MIN(hid_layer.res_len, U2FHID_INIT_PAYLOAD_SIZE));
325 3 }
326 2 else
327 2 {
328 3 u2f_hid_writeback(req->pkt.cont.payload, MIN(hid_layer.res_len - hid_layer.bytes_written, U2FHID_CONT_
321 2
322 2 break;
323 2 case U2FHID_PING:
324 2
325 2 //u2f_prints("U2F PING\r\n");
326 2
327 2 if (!u2f_hid_busy())
328 2 {
329 3 u2f_hid_set_len(U2FHID_LEN(req));
330 3 u2f_hid_writeback(req->pkt.init.payload, MIN(hid_layer.res_len, U2FHID_INIT_PAYLOAD_SIZE));
331 3 }
332 2 else
333 2 {
334 3 u2f_hid_writeback(req->pkt.cont.payload, MIN(hid_layer.res_len - hid_layer.bytes_written, U2FHID_CONT_
-PAYLOAD_SIZE));
329 3 }
330 2
331 2 if (hid_layer.res_len == hid_layer.bytes_written) u2f_hid_flush();
332 2 break;
333 2
334 2 case U2FHID_WINK:
335 2 //u2f_prints("U2F WINK\r\n");
336 2 if (U2FHID_LEN(req) != 0)
337 2 {
338 3 // this one is safe
339 3 stamp_error(hid_layer.current_cid, ERR_INVALID_LEN);
340 3 u2f_prints("invalid len wink but who cares\r\n");
341 3 }
342 2 u2f_hid_set_len(0);
343 2 u2f_hid_writeback(NULL, 0);
344 2 u2f_hid_flush();
345 2 appdata.state = APP_WINK;
346 2 break;
347 2 case U2FHID_LOCK:
348 2 // TODO
349 2 //u2f_prints("U2F LOCK\r\n");
350 2 break;
351 2 default:
352 2 u2f_printb("invalid cmd: ", hid_layer.current_cmd);
353 2 stamp_error(hid_layer.current_cid, ERR_INVALID_CMD);
354 2 goto fail;
355 2 }
356 1
357 1 return;
358 1
359 1 fail:
360 1 u2f_prints("U2F HID FAIL\r\n");
361 1 return;
C51 COMPILER V9.53.0.0 U2F_HID 03/28/2016 20:18:26 PAGE 7
335 3 }
336 2
337 2 if (hid_layer.res_len == hid_layer.bytes_written) u2f_hid_flush();
338 2 break;
339 2
340 2 case U2FHID_WINK:
341 2 //u2f_prints("U2F WINK\r\n");
342 2 if (U2FHID_LEN(req) != 0)
343 2 {
344 3 // this one is safe
345 3 stamp_error(hid_layer.current_cid, ERR_INVALID_LEN);
346 3 u2f_prints("invalid len wink but who cares\r\n");
347 3 }
348 2 u2f_hid_set_len(0);
349 2 u2f_hid_writeback(NULL, 0);
350 2 u2f_hid_flush();
351 2 appdata.state = APP_WINK;
352 2 break;
353 2 case U2FHID_LOCK:
354 2 // TODO
355 2 //u2f_prints("U2F LOCK\r\n");
356 2 break;
357 2 default:
358 2 u2f_printb("invalid cmd: ", hid_layer.current_cmd);
359 2 stamp_error(hid_layer.current_cid, ERR_INVALID_CMD);
360 2 goto fail;
361 2 }
362 1
C51 COMPILER V9.53.0.0 U2F_HID 03/29/2016 00:06:40 PAGE 7
362 1 }
363
364
365 void u2f_hid_request(struct u2f_hid_msg* req)
366 {
367 1 uint8_t* payload = req->pkt.init.payload;
368 1 struct CID* cid = get_cid(req->cid);
369 1
370 1
371 1 if (cid != NULL)
372 1 {
373 2 refresh_cid(cid);
374 2 }
375 1 else if (req->cid == U2FHID_BROADCAST)
376 1 {
377 2
378 2 }
379 1 else
380 1 {
381 2 // Ignore CID's we did not allocate.
382 2 //u2f_printlx("ignoring pkt ",1,req->cid);
383 2 return;
363 1 return;
364 1
365 1 fail:
366 1 u2f_prints("U2F HID FAIL\r\n");
367 1 return;
368 1 }
369
370
371 void u2f_hid_request(struct u2f_hid_msg* req)
372 {
373 1 uint8_t* payload = req->pkt.init.payload;
374 1 struct CID* cid = get_cid(req->cid);
375 1
376 1
377 1 if (cid != NULL)
378 1 {
379 2 refresh_cid(cid);
380 2 }
381 1 else if (req->cid == U2FHID_BROADCAST)
382 1 {
383 2
384 2 }
385 1
386 1 hid_layer.state = (u2f_hid_busy()) ? HID_BUSY : HID_READY;
387 1
388 1 switch(hid_layer.state)
389 1 {
390 2 case HID_READY:
391 2 if (req->pkt.init.cmd & TYPE_INIT)
392 2 {
393 3 if (U2FHID_LEN(req) > U2FHID_MAX_PAYLOAD_SIZE)
394 3 {
395 4 //u2f_prints("length too big\r\n");
396 4 stamp_error(req->cid, ERR_INVALID_LEN);
397 4 return;
398 4 }
399 3 u2f_hid_reset_packet();
400 3 hid_layer.current_cid = req->cid;
401 3 hid_layer.current_cmd = req->pkt.init.cmd;
402 3 hid_layer.last_buffered = get_ms();
403 3
404 3
405 3 }
406 2 else
407 2 {
408 3 stamp_error(req->cid, ERR_INVALID_CMD);
409 3 u2f_prints("ERR_INVALID_CMD\r\n");
410 3 return;
385 1 else
386 1 {
387 2 // Ignore CID's we did not allocate.
388 2 //u2f_printlx("ignoring pkt ",1,req->cid);
389 2 return;
390 2 }
391 1
392 1 hid_layer.state = (u2f_hid_busy()) ? HID_BUSY : HID_READY;
393 1
394 1 switch(hid_layer.state)
395 1 {
396 2 case HID_READY:
397 2 if (req->pkt.init.cmd & TYPE_INIT)
398 2 {
399 3 if (U2FHID_LEN(req) > U2FHID_MAX_PAYLOAD_SIZE)
400 3 {
401 4 //u2f_prints("length too big\r\n");
402 4 stamp_error(req->cid, ERR_INVALID_LEN);
403 4 return;
404 4 }
405 3 u2f_hid_reset_packet();
406 3 hid_layer.current_cid = req->cid;
407 3 hid_layer.current_cmd = req->pkt.init.cmd;
408 3 hid_layer.last_buffered = get_ms();
409 3
410 3
411 3 }
412 2
413 2 break;
414 2 case HID_BUSY:
415 2 // buffer long requests
416 2 if (req->cid == hid_layer.current_cid)
417 2 {
418 3 if (req->pkt.init.cmd & TYPE_INIT)
419 3 {
420 4 // TODO
421 4 //u2f_prints("this should resync but im lazy\r\n");
422 4 }
423 3 hid_layer.last_buffered = get_ms();
424 3 // TODO verify packets arrive in ascending order
C51 COMPILER V9.53.0.0 U2F_HID 03/28/2016 20:18:26 PAGE 8
412 2 else
413 2 {
414 3 stamp_error(req->cid, ERR_INVALID_CMD);
415 3 u2f_prints("ERR_INVALID_CMD\r\n");
416 3 return;
417 3 }
418 2
419 2 break;
420 2 case HID_BUSY:
421 2 // buffer long requests
422 2 if (req->cid == hid_layer.current_cid)
423 2 {
424 3 if (req->pkt.init.cmd & TYPE_INIT)
425 3 {
C51 COMPILER V9.53.0.0 U2F_HID 03/29/2016 00:06:40 PAGE 8
425 3
426 3 }
427 2 else if (U2FHID_TIMEOUT(&hid_layer))
428 2 {
429 3 // return timeout error for old channel and run again for new channel
430 3 //u2f_prints("timeout, switching\r\n");
431 3 hid_layer.state = HID_READY;
432 3 u2f_hid_reset_packet();
433 3 stamp_error(hid_layer.current_cid, ERR_MSG_TIMEOUT);
434 3 u2f_hid_request(req);
435 3 return;
436 3 }
437 2 else
438 2 {
439 3 // Current application may not be interrupted
440 3 // TODO this will be bad
441 3 stamp_error(req->cid, ERR_CHANNEL_BUSY);
442 3 //u2f_printlx("ERR_CHANNEL_BUSY ", 2, req->cid, hid_layer.current_cid);
443 3 return;
444 3 }
445 2 break;
446 2
447 2 }
448 1
449 1 hid_u2f_parse(req);
450 1
451 1
452 1 return;
453 1 }
454
455 #endif
*** WARNING C291 IN LINE 244 OF /home/pp/apps/u2f-zero/firmware/src/u2f_hid.c: not every exit path returns a value
426 4 // TODO
427 4 //u2f_prints("this should resync but im lazy\r\n");
428 4 }
429 3 hid_layer.last_buffered = get_ms();
430 3 // TODO verify packets arrive in ascending order
431 3
432 3 }
433 2 else if (U2FHID_TIMEOUT(&hid_layer))
434 2 {
435 3 // return timeout error for old channel and run again for new channel
436 3 //u2f_prints("timeout, switching\r\n");
437 3 hid_layer.state = HID_READY;
438 3 u2f_hid_reset_packet();
439 3 stamp_error(hid_layer.current_cid, ERR_MSG_TIMEOUT);
440 3 u2f_hid_request(req);
441 3 return;
442 3 }
443 2 else
444 2 {
445 3 // Current application may not be interrupted
446 3 // TODO this will be bad
447 3 stamp_error(req->cid, ERR_CHANNEL_BUSY);
448 3 //u2f_printlx("ERR_CHANNEL_BUSY ", 2, req->cid, hid_layer.current_cid);
449 3 return;
450 3 }
451 2 break;
452 2
453 2 }
454 1
455 1 hid_u2f_parse(req);
456 1
457 1
458 1 return;
459 1 }
460
461 #endif
*** WARNING C291 IN LINE 247 OF /home/pp/apps/u2f-zero/firmware/src/u2f_hid.c: not every exit path returns a value
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 1813 ----
CODE SIZE = 1860 ----
CONSTANT SIZE = 146 ----
XDATA SIZE = 278 45
XDATA SIZE = 330 45
PDATA SIZE = ---- ----
DATA SIZE = ---- ----
IDATA SIZE = ---- ----

Plik binarny nie jest wyświetlany.

Wyświetl plik

@ -1 +1 @@
"/home/pp/apps/u2f-zero/firmware/tests/tests.c" OMF2 LARGE DEBUG OBJECTEXTEND ROM(LARGE) WARNINGLEVEL (2) FLOATFUZZY(3) OPTIMIZE(9,SIZE) INTVECTOR(0x0000) INTPROMOTE INCDIR(/home/pp/apps/u2f-zero/firmware/inc/config;/home/pp/apps/u2f-zero/firmware/inc;/home/pp/apps/u2f-zero/firmware/tinyprintf;/home/pp/apps/u2f-zero/firmware/tests;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/shared/si8051Base;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_usb/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/peripheral_driver/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_assert) REGFILE (u2f-firmware.ORC) PRINT(.\tests/tests.lst) COND PAGEWIDTH (120) PAGELENGTH (65) OBJECT(.\tests/tests.OBJ)
"/home/pp/apps/u2f-zero/firmware/tests/tests.c" OMF2 LARGE DEBUG OBJECTEXTEND ROM(LARGE) WARNINGLEVEL (2) FLOATFUZZY(3) OPTIMIZE(9,SIZE) INTVECTOR(0x0000) INTPROMOTE INCDIR(/home/pp/apps/u2f-zero/firmware/inc/config;/home/pp/apps/u2f-zero/firmware/inc;/home/pp/apps/u2f-zero/firmware/tests;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/shared/si8051Base;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_usb/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/peripheral_driver/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_assert) REGFILE (u2f-firmware.ORC) PRINT(.\tests/tests.lst) COND PAGEWIDTH (120) PAGELENGTH (65) OBJECT(.\tests/tests.OBJ)

Wyświetl plik

@ -1,4 +1,4 @@
C51 COMPILER V9.53.0.0 TESTS 03/28/2016 20:18:25 PAGE 1
C51 COMPILER V9.53.0.0 TESTS 03/29/2016 00:06:38 PAGE 1
C51 COMPILER V9.53.0.0, COMPILATION OF MODULE TESTS
@ -6,12 +6,11 @@ OBJECT MODULE PLACED IN .\tests/tests.OBJ
COMPILER INVOKED BY: Z:\home\pp\SimplicityStudio_v3\developer\toolchains\keil_8051\9.53\BIN\C51.exe /home/pp/apps/u2f-ze
-ro/firmware/tests/tests.c OMF2 LARGE DEBUG OBJECTEXTEND ROM(LARGE) WARNINGLEVEL(2) FLOATFUZZY(3) OPTIMIZE(9,SIZE) INTVEC
-TOR(0X0000) INTPROMOTE INCDIR(/home/pp/apps/u2f-zero/firmware/inc/config;/home/pp/apps/u2f-zero/firmware/inc;/home/pp/ap
-ps/u2f-zero/firmware/tinyprintf;/home/pp/apps/u2f-zero/firmware/tests;/home/pp/SimplicityStudio_v3/developer/sdks/si8051
-/v3//Device/shared/si8051Base;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1;/home/pp/SimplicityS
-tudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_us
-b/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1/peripheral_driver/inc;/home/pp/SimplicityStu
-dio_v3/developer/sdks/si8051/v3//Lib/efm8_assert) REGFILE(u2f-firmware.ORC) PRINT(.\tests/tests.lst) COND PAGEWIDTH(120)
- PAGELENGTH(65) OBJECT(.\tests/tests.OBJ)
-ps/u2f-zero/firmware/tests;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/shared/si8051Base;/home/pp/Simp
-licityStudio_v3/developer/sdks/si8051/v3//Device/EFM8UB1;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Device/E
-FM8UB1/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_usb/inc;/home/pp/SimplicityStudio_v3/develope
-r/sdks/si8051/v3//Device/EFM8UB1/peripheral_driver/inc;/home/pp/SimplicityStudio_v3/developer/sdks/si8051/v3//Lib/efm8_a
-ssert) REGFILE(u2f-firmware.ORC) PRINT(.\tests/tests.lst) COND PAGEWIDTH(120) PAGELENGTH(65) OBJECT(.\tests/tests.OBJ)
line level source
@ -63,9 +62,9 @@ line level source
dump_hex(buf,len);
do{
C51 COMPILER V9.53.0.0 TESTS 03/28/2016 20:18:25 PAGE 2
atecc_send(ATECC_CMD_SHA,
C51 COMPILER V9.53.0.0 TESTS 03/29/2016 00:06:38 PAGE 2
ATECC_SHA_END,
sizeof(pw)-65,pw+64,sizeof(pw)-65);
}while((len = atecc_recv(buf,sizeof(buf))) < 0);
@ -128,9 +127,9 @@ line level source
if (atecc_write_eeprom(ATECC_EEPROM_SLOT(0), ATECC_EEPROM_SLOT_OFFSET(0), &slotconfig, ATECC_EEPROM_SLOT_
-SIZE) != 0)
{
C51 COMPILER V9.53.0.0 TESTS 03/28/2016 20:18:25 PAGE 3
return -1;
C51 COMPILER V9.53.0.0 TESTS 03/29/2016 00:06:38 PAGE 3
}
slotconfig.writeconfig = 0x3;
@ -193,9 +192,9 @@ line level source
if (*(uint16_t*)(res.buf ) != 0x3300 || *(uint16_t*)(res.buf+2) != 0x2f00)
{
return -1;
C51 COMPILER V9.53.0.0 TESTS 03/28/2016 20:18:25 PAGE 4
}
C51 COMPILER V9.53.0.0 TESTS 03/29/2016 00:06:38 PAGE 4
return 0;
}
@ -258,9 +257,9 @@ line level source
eeprom_read(0xFBFF,&secbyte,1);
C51 COMPILER V9.53.0.0 TESTS 03/28/2016 20:18:25 PAGE 5
u2f_printb("security_byte: ",1,secbyte);
C51 COMPILER V9.53.0.0 TESTS 03/29/2016 00:06:38 PAGE 5
if (secbyte == 0xff)
{
@ -323,9 +322,9 @@ line level source
if (rc == 0)
PRINT("--- EEPROM TEST SUCCESS ---\r\n");
else
C51 COMPILER V9.53.0.0 TESTS 03/28/2016 20:18:25 PAGE 6
PRINT("--- EEPROM TEST FAILED ---\r\n");
C51 COMPILER V9.53.0.0 TESTS 03/29/2016 00:06:38 PAGE 6
#endif
#ifdef TEST_KEY_SIGNING

Plik binarny nie jest wyświetlany.

Wyświetl plik

@ -37,6 +37,10 @@ extern void enter_DefaultMode_from_RESET(void) {
TIMER16_2_enter_DefaultMode_from_RESET();
TIMER16_3_enter_DefaultMode_from_RESET();
TIMER_SETUP_0_enter_DefaultMode_from_RESET();
PCA_0_enter_DefaultMode_from_RESET();
PCACH_0_enter_DefaultMode_from_RESET();
PCACH_1_enter_DefaultMode_from_RESET();
PCACH_2_enter_DefaultMode_from_RESET();
SMBUS_0_enter_DefaultMode_from_RESET();
UART_0_enter_DefaultMode_from_RESET();
INTERRUPT_0_enter_DefaultMode_from_RESET();
@ -162,9 +166,9 @@ extern void PORTS_0_enter_DefaultMode_from_RESET(void) {
// crossbar.)
// B1 (Port 0 Bit 1 Skip) = NOT_SKIPPED (P0.1 pin is not skipped by the
// crossbar.)
// B2 (Port 0 Bit 2 Skip) = NOT_SKIPPED (P0.2 pin is not skipped by the
// B2 (Port 0 Bit 2 Skip) = SKIPPED (P0.2 pin is skipped by the
// crossbar.)
// B3 (Port 0 Bit 3 Skip) = NOT_SKIPPED (P0.3 pin is not skipped by the
// B3 (Port 0 Bit 3 Skip) = SKIPPED (P0.3 pin is skipped by the
// crossbar.)
// B4 (Port 0 Bit 4 Skip) = NOT_SKIPPED (P0.4 pin is not skipped by the
// crossbar.)
@ -176,9 +180,9 @@ extern void PORTS_0_enter_DefaultMode_from_RESET(void) {
// crossbar.)
*/
P0SKIP = P0SKIP_B0__NOT_SKIPPED | P0SKIP_B1__NOT_SKIPPED
| P0SKIP_B2__NOT_SKIPPED | P0SKIP_B3__NOT_SKIPPED
| P0SKIP_B4__NOT_SKIPPED | P0SKIP_B5__NOT_SKIPPED
| P0SKIP_B6__NOT_SKIPPED | P0SKIP_B7__NOT_SKIPPED;
| P0SKIP_B2__SKIPPED | P0SKIP_B3__SKIPPED | P0SKIP_B4__NOT_SKIPPED
| P0SKIP_B5__NOT_SKIPPED | P0SKIP_B6__NOT_SKIPPED
| P0SKIP_B7__NOT_SKIPPED;
// [P0SKIP - Port 0 Skip]$
// $[P0MASK - Port 0 Mask]
@ -412,6 +416,17 @@ extern void PBCFG_0_enter_DefaultMode_from_RESET(void) {
// [XBR0 - Port I/O Crossbar 0]$
// $[XBR1 - Port I/O Crossbar 1]
/*
// PCA0ME (PCA Module I/O Enable) = CEX0_CEX1_CEX2 (CEX0, CEX1, CEX2
// routed to Port pins.)
// ECIE (PCA0 External Counter Input Enable) = DISABLED (ECI unavailable
// at Port pin.)
// T0E (T0 Enable) = DISABLED (T0 unavailable at Port pin.)
// T1E (T1 Enable) = DISABLED (T1 unavailable at Port pin.)
// T2E (T2 Enable) = DISABLED (T2 unavailable at Port pin.)
*/
XBR1 = XBR1_PCA0ME__CEX0_CEX1_CEX2 | XBR1_ECIE__DISABLED
| XBR1_T0E__DISABLED | XBR1_T1E__DISABLED | XBR1_T2E__DISABLED;
// [XBR1 - Port I/O Crossbar 1]$
}
@ -782,3 +797,177 @@ extern void USBLIB_0_enter_DefaultMode_from_RESET(void) {
}
extern void PCA_0_enter_DefaultMode_from_RESET(void) {
// $[PCA Off]
PCA0CN0_CR = PCA0CN0_CR__STOP;
// [PCA Off]$
// $[PCA0MD - PCA Mode]
// [PCA0MD - PCA Mode]$
// $[PCA0CENT - PCA Center Alignment Enable]
/*
// CEX0CEN (CEX0 Center Alignment Enable) = CENTER (Center-aligned.)
// CEX1CEN (CEX1 Center Alignment Enable) = CENTER (Center-aligned.)
// CEX2CEN (CEX2 Center Alignment Enable) = CENTER (Center-aligned.)
*/
PCA0CENT = PCA0CENT_CEX0CEN__CENTER | PCA0CENT_CEX1CEN__CENTER
| PCA0CENT_CEX2CEN__CENTER;
// [PCA0CENT - PCA Center Alignment Enable]$
// $[PCA0CLR - PCA Comparator Clear Control]
// [PCA0CLR - PCA Comparator Clear Control]$
// $[PCA0L - PCA Counter/Timer Low Byte]
// [PCA0L - PCA Counter/Timer Low Byte]$
// $[PCA0H - PCA Counter/Timer High Byte]
// [PCA0H - PCA Counter/Timer High Byte]$
// $[PCA0POL - PCA Output Polarity]
// [PCA0POL - PCA Output Polarity]$
// $[PCA0PWM - PCA PWM Configuration]
// [PCA0PWM - PCA PWM Configuration]$
// $[PCA On]
PCA0CN0_CR = PCA0CN0_CR__RUN;
// [PCA On]$
}
extern void PCACH_0_enter_DefaultMode_from_RESET(void) {
// $[PCA0 Settings Save]
// Select Capture/Compare register)
PCA0PWM &= ~PCA0PWM_ARSEL__BMASK;
// [PCA0 Settings Save]$
// $[PCA0CPM0 - PCA Channel 0 Capture/Compare Mode]
/*
// CAPN (Channel 0 Capture Negative Function Enable) = DISABLED (Disable
// negative edge capture.)
// ECCF (Channel 0 Capture/Compare Flag Interrupt Enable) = DISABLED
// (Disable CCF0 interrupts.)
// MAT (Channel 0 Match Function Enable) = DISABLED (Disable match
// function.)
// PWM16 (Channel 0 16-bit Pulse Width Modulation Enable) = 8_BIT (8 to
// 11-bit PWM selected.)
// CAPP (Channel 0 Capture Positive Function Enable) = DISABLED (Disable
// positive edge capture.)
// ECOM (Channel 0 Comparator Function Enable) = ENABLED (Enable
// comparator function.)
// PWM (Channel 0 Pulse Width Modulation Mode Enable) = ENABLED (Enable
// PWM function.)
// TOG (Channel 0 Toggle Function Enable) = DISABLED (Disable toggle
// function.)
*/
PCA0CPM0 = PCA0CPM0_CAPN__DISABLED | PCA0CPM0_ECCF__DISABLED
| PCA0CPM0_MAT__DISABLED | PCA0CPM0_PWM16__8_BIT
| PCA0CPM0_CAPP__DISABLED | PCA0CPM0_ECOM__ENABLED
| PCA0CPM0_PWM__ENABLED | PCA0CPM0_TOG__DISABLED;
// [PCA0CPM0 - PCA Channel 0 Capture/Compare Mode]$
// $[PCA0CPL0 - PCA Channel 0 Capture Module Low Byte]
// [PCA0CPL0 - PCA Channel 0 Capture Module Low Byte]$
// $[PCA0CPH0 - PCA Channel 0 Capture Module High Byte]
// [PCA0CPH0 - PCA Channel 0 Capture Module High Byte]$
// $[Auto-reload]
// [Auto-reload]$
// $[PCA0 Settings Restore]
// [PCA0 Settings Restore]$
}
extern void PCACH_1_enter_DefaultMode_from_RESET(void) {
// $[PCA0 Settings Save]
// Select Capture/Compare register)
PCA0PWM &= ~PCA0PWM_ARSEL__BMASK;
// [PCA0 Settings Save]$
// $[PCA0CPM1 - PCA Channel 1 Capture/Compare Mode]
/*
// CAPN (Channel 1 Capture Negative Function Enable) = DISABLED (Disable
// negative edge capture.)
// ECCF (Channel 1 Capture/Compare Flag Interrupt Enable) = DISABLED
// (Disable CCF1 interrupts.)
// MAT (Channel 1 Match Function Enable) = DISABLED (Disable match
// function.)
// PWM16 (Channel 1 16-bit Pulse Width Modulation Enable) = 8_BIT (8 to
// 11-bit PWM selected.)
// CAPP (Channel 1 Capture Positive Function Enable) = DISABLED (Disable
// positive edge capture.)
// ECOM (Channel 1 Comparator Function Enable) = ENABLED (Enable
// comparator function.)
// PWM (Channel 1 Pulse Width Modulation Mode Enable) = ENABLED (Enable
// PWM function.)
// TOG (Channel 1 Toggle Function Enable) = DISABLED (Disable toggle
// function.)
*/
PCA0CPM1 = PCA0CPM1_CAPN__DISABLED | PCA0CPM1_ECCF__DISABLED
| PCA0CPM1_MAT__DISABLED | PCA0CPM1_PWM16__8_BIT
| PCA0CPM1_CAPP__DISABLED | PCA0CPM1_ECOM__ENABLED
| PCA0CPM1_PWM__ENABLED | PCA0CPM1_TOG__DISABLED;
// [PCA0CPM1 - PCA Channel 1 Capture/Compare Mode]$
// $[PCA0CPL1 - PCA Channel 1 Capture Module Low Byte]
// [PCA0CPL1 - PCA Channel 1 Capture Module Low Byte]$
// $[PCA0CPH1 - PCA Channel 1 Capture Module High Byte]
// [PCA0CPH1 - PCA Channel 1 Capture Module High Byte]$
// $[Auto-reload]
// [Auto-reload]$
// $[PCA0 Settings Restore]
// [PCA0 Settings Restore]$
}
extern void PCACH_2_enter_DefaultMode_from_RESET(void) {
// $[PCA0 Settings Save]
// Select Capture/Compare register)
PCA0PWM &= ~PCA0PWM_ARSEL__BMASK;
// [PCA0 Settings Save]$
// $[PCA0CPM2 - PCA Channel 2 Capture/Compare Mode]
/*
// CAPN (Channel 2 Capture Negative Function Enable) = DISABLED (Disable
// negative edge capture.)
// ECCF (Channel 2 Capture/Compare Flag Interrupt Enable) = DISABLED
// (Disable CCF2 interrupts.)
// MAT (Channel 2 Match Function Enable) = DISABLED (Disable match
// function.)
// PWM16 (Channel 2 16-bit Pulse Width Modulation Enable) = 8_BIT (8 to
// 11-bit PWM selected.)
// CAPP (Channel 2 Capture Positive Function Enable) = DISABLED (Disable
// positive edge capture.)
// ECOM (Channel 2 Comparator Function Enable) = ENABLED (Enable
// comparator function.)
// PWM (Channel 2 Pulse Width Modulation Mode Enable) = ENABLED (Enable
// PWM function.)
// TOG (Channel 2 Toggle Function Enable) = DISABLED (Disable toggle
// function.)
*/
PCA0CPM2 = PCA0CPM2_CAPN__DISABLED | PCA0CPM2_ECCF__DISABLED
| PCA0CPM2_MAT__DISABLED | PCA0CPM2_PWM16__8_BIT
| PCA0CPM2_CAPP__DISABLED | PCA0CPM2_ECOM__ENABLED
| PCA0CPM2_PWM__ENABLED | PCA0CPM2_TOG__DISABLED;
// [PCA0CPM2 - PCA Channel 2 Capture/Compare Mode]$
// $[PCA0CPL2 - PCA Channel 2 Capture Module Low Byte]
// [PCA0CPL2 - PCA Channel 2 Capture Module Low Byte]$
// $[PCA0CPH2 - PCA Channel 2 Capture Module High Byte]
// [PCA0CPH2 - PCA Channel 2 Capture Module High Byte]$
// $[Auto-reload]
// [Auto-reload]$
// $[PCA0 Settings Restore]
// [PCA0 Settings Restore]$
}

Wyświetl plik

@ -29,7 +29,7 @@ SI_INTERRUPT (TIMER2_ISR, TIMER2_IRQn)
#define SMB_TX (SMB_WRITE)
struct smb_interrupt_interface SMB;
volatile uint8_t SMB_FLAGS;
data volatile uint8_t SMB_FLAGS;
static void update_from_packet_length()
{
@ -63,10 +63,9 @@ static void restart_bus()
SMB.errors = 0;
}
uint8_t count = 0;
SI_INTERRUPT (SMBUS0_ISR, SMBUS0_IRQn)
{
uint8_t bus = SMB0CN0 & SMB_STATE_MASK;
data uint8_t bus = SMB0CN0 & SMB_STATE_MASK;
if (SMB0CN0_ARBLOST != 0)
{
goto fail;
@ -76,12 +75,10 @@ SI_INTERRUPT (SMBUS0_ISR, SMBUS0_IRQn)
{
case SMB_STATUS_START:
SMB0DAT = SMB.addr | (SMB_FLAGS & SMB_READ);
count = 0;
SMB0CN0_STA = 0;
break;
case SMB_STATUS_MTX:
count++;
if (!SMB0CN0_ACK)
{
// NACK

Wyświetl plik

@ -326,8 +326,8 @@ void atecc_setup_device(struct config_msg * msg)
atecc_send_recv(ATECC_CMD_READ,
ATECC_RW_CONFIG | ATECC_RW_EXT, 0, NULL, 0,
buf, 40, &res);
memmove(usbres.buf+1, res.buf, 14);
usbres.buf[0] = 14;
memmove(usbres.buf+1, res.buf, 15);
usbres.buf[0] = 15;
break;
case U2F_CONFIG_IS_BUILD:

Wyświetl plik

@ -42,39 +42,26 @@ void set_app_u2f_hid_msg(struct u2f_hid_msg * msg )
}
//void dump_eeprom()
//{
// // 0xF800 - 0xFB7F
// uint16_t i = 0xF800;
// uint8_t eep;
// for (; i <= 0xF800 + 4 * 16; i++)
// {
// eeprom_read(i,&eep,1);
// u2f_putb(eep);
// u2f_prints(" ");
// }
// u2f_prints("\r\n");
//}
int8_t test_app()
void rgb(uint8_t r, uint8_t g, uint8_t b)
{
//u2f_printl("count: ",1,u2f_count());
return 0;
LED_B(b);
LED_G(g);
LED_R(r);
}
#define ms_since(ms,num) (((uint16_t)get_ms() - (ms)) >= num ? (1|(ms=(uint16_t)get_ms())):0)
int16_t main(void) {
data uint8_t i = 0;
data uint16_t last_ms = get_ms();
data uint16_t ms_heart;
data uint16_t ms_wink;
data uint8_t winks = 0;
uint8_t leds = 0;
uint16_t button = 0;
uint16_t ms_heart;
uint16_t ms_wink;
uint16_t ms_grad;
uint8_t winks = 0;
uint8_t grad_dir = 0;
uint8_t light = 0;
enter_DefaultMode_from_RESET();
init(&appdata);
@ -96,22 +83,38 @@ int16_t main(void) {
if (ms_since(ms_heart,500))
{
u2f_printl("ms ", 1, get_ms());
button = U2F_BUTTON;
u2f_printx("button: ",1,button);
LED_G = !LED_G;
test_app();
}
if (!USBD_EpIsBusy(EP1OUT) && !USBD_EpIsBusy(EP1IN) && appdata.state != APP_HID_MSG)
{
USBD_Read(EP1OUT, hidmsgbuf, sizeof(hidmsgbuf), true);
// u2f_prints("read added\r\n");
}
switch(appdata.state)
{
case APP_NOTHING:
if (ms_since(ms_grad, 10))
{
if (light == 90)
{
grad_dir = 0;
}
else if (light == 0)
{
grad_dir = 1;
}
if (grad_dir)
if (U2F_BUTTON_IS_PRESSED())
rgb(0,0,light++);
else
rgb(0,light++,0);
else
if (U2F_BUTTON_IS_PRESSED())
rgb(0,0,light--);
else
rgb(0,light--,0);
}
break;
case APP_HID_MSG:
#ifndef ATECC_SETUP_DEVICE
@ -123,16 +126,17 @@ int16_t main(void) {
appdata.state = APP_NOTHING;
break;
case APP_WINK:
LED_B = 0;
rgb(0,0,150);
light = 150;
ms_wink = get_ms();
appdata.state = _APP_WINK;
break;
case _APP_WINK:
LED_G = 1;
LED_R = 1;
if (ms_since(ms_wink,150))
{
LED_B = !LED_B;
rgb(0,0,light);
light = light == 0 ? 150 : 0;
winks++;
}
if (winks == 5)
@ -147,6 +151,7 @@ int16_t main(void) {
{
u2f_printb("error: ", 1, appdata.error);
appdata.error = 0;
rgb(200,0,0);
}

Wyświetl plik

@ -55,7 +55,6 @@ void u2f_init()
// initialize key handles
if (key_store.num_keys != U2F_NUM_KEYS)
{
u2f_prints("init key handles\r\n");
key_store.num_keys = U2F_NUM_KEYS;
key_store.valid_keys = 0;
key_store.num_issued = 0;
@ -91,6 +90,25 @@ void u2f_response_start()
int8_t u2f_get_user_feedback()
{
uint32_t t = get_ms();
while(!U2F_BUTTON_IS_PRESSED())
{
// turn yellow
rgb(128,128,0);
if (get_ms() - t > 10000)
break;
}
if (U2F_BUTTON_IS_PRESSED())
{
rgb(0,150,128);
}
else
{
rgb(200,0,0);
return 1;
}
return 0;
}
@ -242,20 +260,20 @@ code char __attest[] =
"\x04\x03\x02\x30\x39\x31\x0b\x30\x09\x06\x03\x55\x04\x06\x13\x02\x56\x41\x31\x14"
"\x30\x12\x06\x03\x55\x04\x0a\x13\x0b\x43\x6f\x6e\x6f\x72\x43\x6f\x20\x4c\x4c\x43"
"\x31\x14\x30\x12\x06\x03\x55\x04\x03\x13\x0b\x75\x32\x66\x7a\x65\x72\x6f\x2e\x63"
"\x6f\x6d\x30\x1e\x17\x0d\x31\x36\x30\x33\x32\x39\x30\x30\x31\x37\x30\x35\x5a\x17"
"\x0d\x32\x32\x30\x33\x32\x38\x30\x30\x31\x37\x30\x35\x5a\x30\x39\x31\x0b\x30\x09"
"\x6f\x6d\x30\x1e\x17\x0d\x31\x36\x30\x33\x32\x39\x30\x34\x30\x36\x33\x35\x5a\x17"
"\x0d\x32\x32\x30\x33\x32\x38\x30\x34\x30\x36\x33\x35\x5a\x30\x39\x31\x0b\x30\x09"
"\x06\x03\x55\x04\x06\x13\x02\x56\x41\x31\x14\x30\x12\x06\x03\x55\x04\x0a\x13\x0b"
"\x43\x6f\x6e\x6f\x72\x43\x6f\x20\x4c\x4c\x43\x31\x14\x30\x12\x06\x03\x55\x04\x03"
"\x13\x0b\x75\x32\x66\x7a\x65\x72\x6f\x2e\x63\x6f\x6d\x30\x59\x30\x13\x06\x07\x2a"
"\x86\x48\xce\x3d\x02\x01\x06\x08\x2a\x86\x48\xce\x3d\x03\x01\x07\x03\x42\x00\x04"
"\x49\xc0\x88\x08\xf6\xff\xe0\x1f\xa3\xe0\x28\x28\xfb\x22\x1b\x20\xc0\xa4\xa3\x95"
"\xba\xdc\xeb\xcf\xbd\x27\x45\xaa\xa5\x2f\x1f\x19\x6c\xfa\xe0\x0d\xdd\xc0\xef\x5d"
"\x1e\xc1\x4d\x4b\x9a\x74\xb4\x30\x81\xfa\x93\x39\x0d\xc9\x35\xbd\xea\xce\x6a\x9b"
"\x53\xa3\x3e\xbc\x30\x0a\x06\x08\x2a\x86\x48\xce\x3d\x04\x03\x02\x03\x48\x00\x30"
"\x45\x02\x21\x00\xb4\xc1\xbc\x9c\x5c\x90\xab\xbf\x34\x29\x40\xf7\xe9\x4f\xb2\x4e"
"\x74\x4b\x0a\x0d\x5c\x71\x0d\x7c\xd3\xa7\x9a\x13\x2d\xca\x2d\x10\x02\x20\x3f\x4c"
"\x60\x70\x15\x2a\xc0\x1a\xc3\xad\xa3\x4b\x13\x24\x1c\x8d\x78\xa4\xcb\x34\xa7\xbc"
"\x21\xe2\xdf\x20\x4f\xb1\x85\x92\xdc\x6a"
"\xa6\x03\x66\x51\x15\xdc\xeb\xf5\xb8\xdb\x32\xe7\x66\x5e\xf6\x6a\x39\xbc\x15\x37"
"\x8c\x65\x5f\xeb\xd4\x8b\xa9\x51\xee\x61\x02\xc2\xc8\x32\x1e\x73\xb2\x7d\xe8\x09"
"\x79\xda\xf9\xd1\x42\x48\xe8\x1f\x0b\x43\xae\x63\x99\xf2\x52\x83\x81\x5f\x87\x74"
"\x79\x17\x84\x1f\x30\x0a\x06\x08\x2a\x86\x48\xce\x3d\x04\x03\x02\x03\x48\x00\x30"
"\x45\x02\x21\x00\x8b\xb7\xfa\xa2\x02\xb7\x24\xa3\x8d\xca\xab\x74\x44\xc3\x4c\xdc"
"\x80\x3a\xa5\x67\xdb\x36\xa1\x41\xda\xd6\xf3\x94\x38\x4c\xb6\xbd\x02\x20\x1f\x33"
"\x7e\xa3\x46\xf4\x77\x75\xe9\xe5\x4a\xe5\x92\x18\x4a\x11\xc0\x0b\x3c\x13\xa3\x61"
"\x68\x68\xae\x90\xbc\x01\xdd\x32\x8d\xe0"
// }}}
;

Wyświetl plik

@ -101,6 +101,12 @@ static int16_t u2f_authenticate(struct u2f_authenticate_request * req, uint8_t c
return U2F_SW_CONDITIONS_NOT_SATISFIED;
}
if (u2f_get_user_feedback())
{
u2f_hid_set_len(2);
return U2F_SW_CONDITIONS_NOT_SATISFIED;
}
count = u2f_count();
u2f_sha256_start();
@ -135,7 +141,7 @@ static int16_t u2f_register(struct u2f_register_request * req)
const uint16_t attest_size = u2f_attestation_cert_size();
if (u2f_get_user_feedback() != 0)
if (u2f_get_user_feedback())
{
return U2F_SW_CONDITIONS_NOT_SATISFIED;
}

Wyświetl plik

@ -37,6 +37,7 @@ static struct hid_layer_param
uint32_t last_buffered;
uint16_t bytes_buffered;
uint16_t req_len;
// number of payload bytes written in response
uint16_t bytes_written;
@ -46,7 +47,7 @@ static struct hid_layer_param
// total length of response in bytes
uint16_t res_len;
#define BUFFER_SIZE 150
#define BUFFER_SIZE 200
uint8_t buffer[BUFFER_SIZE];
@ -229,6 +230,7 @@ static void start_buffering(struct u2f_hid_msg* req)
{
_hid_in_session = 1;
hid_layer.bytes_buffered = U2FHID_INIT_PAYLOAD_SIZE;
hid_layer.req_len = U2FHID_LEN(req);
memmove(hid_layer.buffer, req->pkt.init.payload, U2FHID_INIT_PAYLOAD_SIZE);
}
@ -237,6 +239,7 @@ static int buffer_request(struct u2f_hid_msg* req)
if (hid_layer.bytes_buffered + U2FHID_CONT_PAYLOAD_SIZE > BUFFER_SIZE)
{
u2f_prints("buffer full\r\n");
stamp_error(req->cid, ERR_OTHER);
return -1;
}
memmove(hid_layer.buffer + hid_layer.bytes_buffered, req->pkt.cont.payload, U2FHID_CONT_PAYLOAD_SIZE);
@ -309,7 +312,10 @@ static void hid_u2f_parse(struct u2f_hid_msg* req)
else
{
buffer_request(req);
u2f_request((struct u2f_request_apdu *)hid_layer.buffer);
if (hid_layer.bytes_buffered >= hid_layer.req_len)
{
u2f_request((struct u2f_request_apdu *)hid_layer.buffer);
}
}

Wyświetl plik

@ -15,6 +15,7 @@
<property object="CLOCK_0" propertyId="clock.clockselect.clocksourcedivider" value="SYSCLK / 1"/>
<property object="CLOCK_0" propertyId="clock.clockselect.selectclocksource" value="Internal High Frequency Oscillator 1"/>
<property object="CRC_0" propertyId="crc.crccontrol.enablecrcinitialization" value="Initialize"/>
<property object="CROSSBAR0" propertyId="xbar0.pca0.cex" value="CEX0, CEX1, and CEX2"/>
<property object="CROSSBAR0" propertyId="xbar0.smbus0.clockdata" value="Enabled"/>
<property object="CROSSBAR0" propertyId="xbar0.uart0.data" value="Enabled"/>
<property object="DefaultMode" propertyId="mode.diagramLocation" value="100, 100"/>
@ -23,24 +24,50 @@
<property object="INTERRUPT_0" propertyId="interrupt.extendedinterruptenable1.enabletimer3interrupt" value="Enabled"/>
<property object="INTERRUPT_0" propertyId="interrupt.interruptenable.enableallinterrupts" value="Enabled"/>
<property object="INTERRUPT_0" propertyId="interrupt.interruptenable.enabletimer2interrupt" value="Enabled"/>
<property object="P0.0" propertyId="ports.settings.iomode" value="Digital Push-Pull Output"/>
<property object="P0.0" propertyId="ports.settings.outputmode" value="Push-pull"/>
<property object="P0.0" propertyId="ports.settings.skip" value="Skipped"/>
<property object="P0.1" propertyId="ports.settings.iomode" value="Digital Push-Pull Output"/>
<property object="P0.1" propertyId="ports.settings.outputmode" value="Push-pull"/>
<property object="P0.1" propertyId="ports.settings.skip" value="Skipped"/>
<property object="P0.2" propertyId="ports.settings.iomode" value="Digital Push-Pull Output"/>
<property object="P0.2" propertyId="ports.settings.outputmode" value="Push-pull"/>
<property object="P0.2" propertyId="ports.settings.skip" value="Skipped"/>
<property object="P0.3" propertyId="ports.settings.maskvalue" value="Compared"/>
<property object="P0.3" propertyId="ports.settings.iomode" value="Digital Push-Pull Output"/>
<property object="P0.3" propertyId="ports.settings.outputmode" value="Push-pull"/>
<property object="P0.3" propertyId="ports.settings.skip" value="Skipped"/>
<property object="P0.4" propertyId="ports.settings.iomode" value="Digital Push-Pull Output"/>
<property object="P0.4" propertyId="ports.settings.outputmode" value="Push-pull"/>
<property object="P0.6" propertyId="ports.settings.skip" value="Skipped"/>
<property object="P0.7" propertyId="ports.settings.skip" value="Skipped"/>
<property object="P1.0" propertyId="ports.settings.skip" value="Skipped"/>
<property object="P2.0" propertyId="ports.settings.skip" value="Skipped"/>
<property object="P0.6" propertyId="ports.settings.iomode" value="Digital Push-Pull Output"/>
<property object="P0.6" propertyId="ports.settings.outputmode" value="Push-pull"/>
<property object="P0.7" propertyId="ports.settings.iomode" value="Digital Push-Pull Output"/>
<property object="P0.7" propertyId="ports.settings.outputmode" value="Push-pull"/>
<property object="P1.0" propertyId="ports.settings.iomode" value="Digital Push-Pull Output"/>
<property object="P1.0" propertyId="ports.settings.outputmode" value="Push-pull"/>
<property object="PBCFG_0" propertyId="pbcfg.settings.enablecrossbar" value="Enabled"/>
<property object="PCACH_0" propertyId="ABPeripheral.included" value="true"/>
<property object="PCACH_0" propertyId="pcach.pcachannel.capturecompareregister" value="65500"/>
<property object="PCACH_0" propertyId="pcach.pcachannel.clockdivider" value="100"/>
<property object="PCACH_0" propertyId="pcach.pcachannel.pcaalignment" value="Center-aligned PWM"/>
<property object="PCACH_0" propertyId="pcach.pcachannelcapturecomparemode.enablechannelcomparatorfunction" value="Enabled"/>
<property object="PCACH_0" propertyId="pcach.pcachannelcapturecomparemode.enablechannelpulsewidthmodulationmoden" value="Enabled"/>
<property object="PCACH_0" propertyId="pcach.pcacontrol.channelcapturecomparemode" value="Predefined 8~11-bit pulse modulator"/>
<property object="PCACH_1" propertyId="ABPeripheral.included" value="true"/>
<property object="PCACH_1" propertyId="pcach.pcachannel.capturecompareregister" value="25600"/>
<property object="PCACH_1" propertyId="pcach.pcachannel.clockdivider" value="100"/>
<property object="PCACH_1" propertyId="pcach.pcachannel.pcaalignment" value="Center-aligned PWM"/>
<property object="PCACH_1" propertyId="pcach.pcachannelcapturecomparemode.enablechannelcomparatorfunction" value="Enabled"/>
<property object="PCACH_1" propertyId="pcach.pcachannelcapturecomparemode.enablechannelpulsewidthmodulationmoden" value="Enabled"/>
<property object="PCACH_1" propertyId="pcach.pcacontrol.channelcapturecomparemode" value="Predefined 8~11-bit pulse modulator"/>
<property object="PCACH_2" propertyId="ABPeripheral.included" value="true"/>
<property object="PCACH_2" propertyId="pcach.pcachannel.capturecompareregister" value="25600"/>
<property object="PCACH_2" propertyId="pcach.pcachannel.clockdivider" value="100"/>
<property object="PCACH_2" propertyId="pcach.pcachannel.pcaalignment" value="Center-aligned PWM"/>
<property object="PCACH_2" propertyId="pcach.pcachannelcapturecomparemode.enablechannelcomparatorfunction" value="Enabled"/>
<property object="PCACH_2" propertyId="pcach.pcachannelcapturecomparemode.enablechannelpulsewidthmodulationmoden" value="Enabled"/>
<property object="PCACH_2" propertyId="pcach.pcacontrol.channelcapturecomparemode" value="Predefined 8~11-bit pulse modulator"/>
<property object="PCA_0" propertyId="ABPeripheral.included" value="true"/>
<property object="PCA_0" propertyId="pca.pcacountertimerconfiguration.pcaclockfrequency" value="4.000 MHz"/>
<property object="PCA_0" propertyId="pca.pcacountertimerconfiguration.pcaclockfrequencyintegervalue" value="4000000.0"/>
<property object="PCA_0" propertyId="pca.pcacountertimerconfiguration.pcaclockperiod" value="250.000 nS"/>
<property object="PCA_0" propertyId="pca.pcacountertimerruncontrol.pcarun" value="Start"/>
<property object="PCA_0" propertyId="pca.pcapwmconfiguration.cex0centeralignmentenable" value="Center-aligned PWM"/>
<property object="PCA_0" propertyId="pca.pcapwmconfiguration.cex1centeralignmentenable" value="Center-aligned PWM"/>
<property object="PCA_0" propertyId="pca.pcapwmconfiguration.cex2centeralignmentenable" value="Center-aligned PWM"/>
<property object="SMBUS_0" propertyId="ABPeripheral.included" value="true"/>
<property object="SMBUS_0" propertyId="smbus.configuration.enablesmbus" value="Enabled"/>
<property object="SMBUS_0" propertyId="smbus.configuration.enablesmbusfreetimeoutdetection" value="Enabled"/>
@ -102,10 +129,7 @@
<property object="USBLIB_0" propertyId="endpoints.endpoint3in.maxpacketsizebytes" value="64"/>
<property object="USBLIB_0" propertyId="endpoints.endpoint3out.maxpacketsizebytes" value="64"/>
<property object="USBLIB_0" propertyId="interfaces.interface0.hidpollingintervalms" value="24"/>
<property object="USBLIB_0" propertyId="interfaces.interface0.hidreportdescriptor" value="&#xA; 0x05, 0x01, // USAGE_PAGE (Generic Desktop)&#xA; 0x09, 0x06, // USAGE (Keyboard)&#xA; 0xa1, 0x01, // COLLECTION (Application)&#xA; 0x05, 0x07, // USAGE_PAGE (Keyboard)&#xA; 0x19, 0xe0, // USAGE_MINIMUM (Keyboard LeftControl)&#xA; 0x29, 0xe7, // USAGE_MAXIMUM (Keyboard Right GUI)&#xA; 0x15, 0x00, // LOGICAL_MINIMUM (0)&#xA; 0x25, 0x01, // LOGICAL_MAXIMUM (1)&#xA; 0x75, 0x01, // REPORT_SIZE (1)&#xA; 0x95, 0x08, // REPORT_COUNT (8)&#xA; 0x81, 0x02, // INPUT (Data,Var,Abs)&#xA; 0x15, 0x00, // LOGICAL_MINIMUM (0)&#xA; 0x25, 0x01, // LOGICAL_MAXIMUM (1)&#xA; 0x75, 0x01, // REPORT_SIZE (1)&#xA; 0x95, 0x08, // REPORT_COUNT (8)&#xA; 0x81, 0x01, // INPUT (Cnst,Ary,Abs)&#xA; 0x19, 0x00, // USAGE_MINIMUM (Reserved (no event indicated))&#xA; 0x29, 0x65, // USAGE_MAXIMUM (Keyboard Application)&#xA; 0x15, 0x00, // LOGICAL_MINIMUM (0)&#xA; 0x25, 0x65, // LOGICAL_MAXIMUM (101)&#xA; 0x75, 0x08, // REPORT_SIZE (8)&#xA; 0x95, 0x06, // REPORT_COUNT (6)&#xA; 0x81, 0x00, // INPUT (Data,Ary,Abs)&#xA; 0x05, 0x08, // USAGE_PAGE (LEDs)&#xA; 0x19, 0x01, // USAGE_MINIMUM (Num Lock)&#xA; 0x29, 0x03, // USAGE_MAXIMUM (Scroll Lock)&#xA; 0x15, 0x00, // LOGICAL_MINIMUM (0)&#xA; 0x25, 0x01, // LOGICAL_MAXIMUM (1)&#xA; 0x75, 0x01, // REPORT_SIZE (1)&#xA; 0x95, 0x03, // REPORT_COUNT (3)&#xA; 0x91, 0x02, // OUTPUT (Data,Var,Abs)&#xA; 0x75, 0x01, // REPORT_SIZE (1)&#xA; 0x95, 0x05, // REPORT_COUNT (5)&#xA; 0x91, 0x01, // OUTPUT (Cnst,Ary,Abs)&#xA; 0xc0 // END_COLLECTION&#xA;"/>
<property object="USBLIB_0" propertyId="interfaces.interface0.hidreporttemplate" value="Keyboard"/>
<property object="USBLIB_0" propertyId="interfaces.interface0.interfaceclass" value="HID (Human Interface Device)"/>
<property object="USBLIB_0" propertyId="interfaces.interface0.interfacestring" value="HID Keyboard"/>
<property object="USBLIB_0" propertyId="library.callbackfunctions.resetcallback" value="Enabled"/>
<property object="USBLIB_0" propertyId="library.callbackfunctions.selfpoweredcallback" value="Enabled"/>
<property object="USBLIB_0" propertyId="library.callbackfunctions.setupcommandcallback" value="Enabled"/>