Compile errors with arduino Due as board...why?

Before I start chasing red herrings.

What exactly is ambiguous about any of this when I select a Due as my board?

None of this is ambiguous if I select a Mega as my board.

Is it __FlashStringHelper that is causing the problem?

Can you not use __FlashStringHelper when compiling for Due?

sketch\List.cpp: In member function 'void CListItem::dump()':

List.cpp:48: error: call of overloaded 'dump(const __FlashStringHelper*, uint8_t&, int)' is ambiguous

   debug.dump(F("m_nStationNum"), m_nStationNum, false);

                                                      ^

sketch\List.cpp:48:54: note: candidates are:

In file included from sketch\List.cpp:2:0:

sketch\Debug.h:37:10: note: void CDebug::dump(const __FlashStringHelper*, uint32_t, bool)

     void dump(const __FlashStringHelper* strVarName, const uint32_t nVal, const bool bNewLine = true);

          ^

exit status 1
call of overloaded 'dump(const __FlashStringHelper*, uint8_t&, int)' is ambiguous

Debug.cpp (13.6 KB)

Debug.h (2.68 KB)

You’re using two completely different architectures; the helper cast doesn’t work on the Due’s ARM

See this:

sketch\List.cpp:48:54: note: candidates are:

Not many candidates in that list, are there?

Can you not use __FlashStringHelper when compiling for Due?

No. It is a different architecture, and doesn't need to keep string literals out of SRAM.

OK thank you.

I was going to try and adjust my code to work on Due and I thought it would be fairly minor.

But since I have used __FlashStringHelper every where it not going to be an easy code tweak.

And I am not fully up to speed with the precise differences in a architecture.

If I remember correctly the SRAM and flash are in two separate isolated banks on the mega and uno etc, which is why you need the P and __FlashStringHelper?

But presumably the memory on the Due is more like a PC - all in one block and continuously addressable?

So I take it that __FlashStringHelper is being re-defined as, perhaps char*, which means those functions are now conflicting with all my specific char* versions of the same functions?

It's a very simple tweak, surely?
Just redefine F()

AWOL:
It's a very simple tweak, surely?
Just redefine F()

I assumed that the IDE would do this #define F(STR) STR but obviously not.

But this wont solve all the duplicate functions I have, one with __Flash.... and one with const char* parameters.