Firmware: auto-detect version number base in firmware image generator

This commit is contained in:
Maximilian Rehkopf 2012-05-02 10:57:19 +02:00
parent dc478186e5
commit 6cff0f66e0
2 changed files with 2 additions and 2 deletions

View File

@ -1,4 +1,4 @@
CONFIG_VERSION="0.1.3"
#FWVER=00010300
CONFIG_FWVER=66304
CONFIG_FWVER=0x00010300
CONFIG_MCU_FOSC=12000000

View File

@ -73,7 +73,7 @@ int main(int argc, char **argv) {
return 1;
}
char *remaining = NULL;
uint32_t version = (uint32_t)strtol(argv[3], &remaining, 10);
uint32_t version = (uint32_t)strtol(argv[3], &remaining, 0);
if(*remaining) {
printf("could not parse version number (remaining portion: %s)\n", remaining);
fclose(f);