I have an old project for the F2812 processor that began life with CCS 3.1.
It has been progressively migrated to CCS 3.3, various versions of CCS 4.x, and finally into CCS 5 (current version 5.1.0.09000).
The current problem arose when I moved into the CCS 5 world.
Since migrating to CCS5.1, I get compile time errors with several classes that have multiple levels of inheritance. I will not go into all the classes but show one as an example.
My question is … Why did this error start cropping up in 5.1, and how do I deal with it?
The error messages …
The type ‘C28Flash’ must implement the inherited pure virtual method ‘ReadOnlyMemory::Erase’
The type ‘C28Flash’ must implement the inherited pure virtual method ‘ReadOnlyMemory::IsBlank’
The type ‘C28Flash’ must implement the inherited pure virtual method ‘ReadOnlyMemory::Verify’
The type ‘C28Flash’ must implement the inherited pure virtual method ‘ReadOnlyMemory::Write’
The Header files showing the inheritance follow ...
The contents of the C28Flash.h file are …
#pragma once
#include "ReadOnlyMemory.h"
class C28Flash : public ReadOnlyMemory
{
public:
C28Flash( const wchar_t* _name );
virtual bool Write( void* address, void* buffer, size_t size );
virtual bool Verify( void* address, void* buffer, size_t size );
virtual bool Erase( void* address, size_t size );
virtual bool IsBlank( void* address, size_t size );
private:
bool EraseSectors( uint16_t sectorMask );
uint16_t GetSectorMask( void* address );
friend class CoffLoader;
};
The contents of the ReadOnlyMemory.h file are …
#pragma once
#include "Object.h"
class ReadOnlyMemory : public Object
{
public:
ReadOnlyMemory( const wchar_t* _name );
virtual bool Write( void* address, void* buffer, size_t size ) = 0;
virtual bool Verify( void* address, void* buffer, size_t size ) = 0;
virtual bool Erase( void* address, size_t size ) = 0;
virtual bool IsBlank( void* address, size_t size ) = 0;
};
///////////////////////////////////////////////////////////////////////////////
inline ReadOnlyMemory::ReadOnlyMemory( const wchar_t* _name )
: Object( _name )
{
}
As you can see, the C28Flash class inherits from the ReadOnlyMemory class which in turn inherits from the Object class.
The C28Flash class does implement the functions in the C28Flash.cpp file as …
(I have removed the code from the functions as not pertinent to this discussion.)
bool C28Flash::Write( void* address, void* buffer, size_t size )
{
}
bool C28Flash::Verify( void* address, void* buffer, size_t size )
{
}
bool C28Flash::Erase( void* address, size_t size )
{
}
bool C28Flash::IsBlank( void* address, size_t size )
{
}