CHG: fiddled with the headerfiles... and makefile... Tried to make them behave nice. So it isnt a hell to add new functions from third-party (like des, aes etc)

Added a lot of #ifndef ,   extern C,
Move inside from ARMSRC -> THUMBS,  which made the compiled image smaller.. I don't know if it broke anything.
Moved MF_DBGLEVEL definitions into common.h
Moved print_result from util.c into appmain.c
Also split up some struct typedef  into header files so they could be reused in other code places.

''' danger '''  this might have broken stuff...
This commit is contained in:
iceman1001 2017-01-25 00:33:03 +01:00
commit 53d5dc643f
27 changed files with 153 additions and 190 deletions

View file

@ -9,6 +9,9 @@
// with the linker script.
//-----------------------------------------------------------------------------
#ifndef __START_H
#define __START_H
#include "proxmark3.h"
#include "apps.h"
#include "zlib.h"
@ -18,7 +21,6 @@ static uint8_t *next_free_memory;
extern struct common_area common_area;
extern char __data_src_start__, __data_start__, __data_end__, __bss_start__, __bss_end__;
static voidpf inflate_malloc(voidpf opaque, uInt items, uInt size)
{
uint8_t *allocated_memory;
@ -28,11 +30,9 @@ static voidpf inflate_malloc(voidpf opaque, uInt items, uInt size)
return allocated_memory;
}
static void inflate_free(voidpf opaque, voidpf address)
{
// nothing to do
}
static void uncompress_data_section(void)
@ -60,7 +60,6 @@ static void uncompress_data_section(void)
common_area.arg1 = data_section.total_in;
}
void __attribute__((section(".startos"))) Vector(void)
{
/* Stack should have been set up by the bootloader */
@ -80,6 +79,6 @@ void __attribute__((section(".startos"))) Vector(void)
// end = &__data_end__;
// while(dst < end) *dst++ = *src++;
AppMain();
}
#endif