GCC garbage collection enabled, not tested

master
Stefan Krulj 14 years ago
parent decce4d4d8
commit be49d342e2
  1. 13
      Makefile
  2. 4
      sha1.c
  3. 4
      test.c

@ -67,13 +67,16 @@ CFLAGS=-I. $(INC) -g -mmcu=$(MCU) -O$(OPTLEVEL) \
-fno-inline-functions \
-fno-inline-small-functions \
-fno-split-wide-types \
-fpack-struct -fshort-enums \
-funsigned-bitfields -funsigned-char \
-fpack-struct \
-fshort-enums \
-funsigned-bitfields \
-funsigned-char \
-Wall -Wstrict-prototypes \
-Wl,--gc-sections \
-Wl,--print-gc-sections \
-ffunction-sections -fdata-sections \
-Wa,-ahlms=$(firstword \
--gc-sections \
--print-gc-sections \
$(filter %.lst, $(<:.c=.lst)))
$(filter %.lst, $(<:.c=.lst)))
ASMFLAGS =-I. $(INC) -mmcu=$(MCU) \
-x assembler-with-cpp \
-DF_CPU=16500000 \

@ -103,7 +103,7 @@ void sha1_fill(int32_t len){
}
}
/*void sha1(char* msg, int32_t len){
void sha1(char* msg, int32_t len){
int32_t i;
uint8_t j;
sha1_init();
@ -120,7 +120,7 @@ void sha1_fill(int32_t len){
sha1_addbyte(msg[i+j]);
}
}
}*/
}
void sha1_init(void){
chunk_cnt=0;

@ -62,7 +62,5 @@ int main(){
hmac(MSG2,8,sec,20);
SHA1STR();
printf("HMAC: %s\n",sha1sum);
//assert(strcmp("b617318655057264e28bc0b6fb378c8ef146be00",sha1sum)==0);
//assert(strcmp("b617318655057264e28bc0b6fb378c8ef146be00",sha1sum)==0);
}

Loading…
Cancel
Save