b) Compilation should end with no error messages.
For example:
>make
- g++ -g -I. -O2 -fno-exceptions flint.cpp -o mstflint
+ g++ -g -I. -Wall -O2 -fno-exceptions flint.cpp -o mstflint
c) An executable mstflint will be generated in the current directory
This is the mstflint utility that can be used to burn and examine
void* data,
int cnt,
bool noerase = false,
- bool noverify = false) = NULL;
+ bool noverify = false) = 0;
- //virtual bool unlock_bypass (bool unlock) = NULL;
- virtual bool erase_sector (u_int32_t addr) = NULL;
+ //virtual bool unlock_bypass (bool unlock) = 0;
+ virtual bool erase_sector (u_int32_t addr) = 0;
- virtual bool reset () = NULL;
+ virtual bool reset () = 0;
protected:
////////////////////////////////////////////////////////////////////////
-Flash::Flash() : curr_sector(0xffffffff), _mf(0), _curr_bank(0xffffffff), _cmd_set(NULL)
+Flash::Flash() : curr_sector(0xffffffff), _mf(0), _curr_bank(0xffffffff), _cmd_set(0)
{
char *use_scr_p = getenv("FLINT_USE_SCRATCHPAD");
unsigned dfn, vend;
cnt = sscanf(buf,
-#ifdef HAVE_LONG_ADDRESS
+#ifdef HAVE_LONG_LONG_ADDRESS
"%x %x %x %llx %llx %llx %llx %llx %llx %llx %llx %llx %llx %llx %llx %llx %llx",
-#else
+#elsif HAVA_LONG_ADDRESS
"%x %x %x %lx %lx %lx %lx %lx %lx %lx %lx %lx %lx %lx %lx %lx %lx",
+#else
+ "%x %x %x %x %x %x %x %x %x %x %x %x %x %x %x %x %x",
#endif
&dfn,
&vend,
&rom_size);
if (cnt != 9 && cnt != 10 && cnt != 17)
{
- fprintf(stderr,"proc: parse error (read only %d items)", cnt);
+ fprintf(stderr,"proc: parse error (read only %d items)\n", cnt);
+ fprintf(stderr,"the offending line in " "/proc/bus/pci/devices" " is "
+ "\"%.*s\"\n", sizeof(buf), buf);
goto error;
}
bus = dfn >> 8U;
if (cnt != 17 || size[1] != 0 || size[0] != 0x100000)
{
- fprintf(stderr,"proc: unexpected size values\n");
+ fprintf(stderr,"proc: unexpected region size values.\n");
+ fprintf(stderr,"the offending line in " "/proc/bus/pci/devices" " is "
+ "\"%.*s\"\n", sizeof(buf), buf);
goto error;
}