682 views
in System Integration by
Hi,

I have migrated from 9.1 to 9.2 with an existing project.

I have replaced the platform package and target specific files and everything builds fine but now get the following on start up:

initialise Graphics Engine...                [OK]
Starting Root Object Creation
EMWI ERROR: code: 309
For details please visit https://doc.embedded-wizard.de/errors
PANIC: System halted

 

Any suggestions?

2 Answers

0 votes
by

Hello Phil,

the description to the error code says 'No class'. It means precisely, the function EwNewObjectIndirect() has been called with NULL in the aClass argument. Please take a look in the function EwInit() found in the module ewmain.c. There you see the initialization code including following invocation:

RootObject = (CoreRoot)EwNewObjectIndirect( EwApplicationClass, 0 );

The error code occurs while EwApplicationClass is NULL. The question here, why is it NULLEwApplicationClass is a global variable defined within the generated code in the file Core.c. It is declared in Core.h. As such it should not be NULL. Can you check, whether this variable is correctly defined?

I suppose some version mismatch or some of the object files have not been rebuilt correctly. Have you tried to clean all object files and the make the project again? And of course when switching to newer version don't forget to generate new code with the new EmWi version. Mixing old EmWi Code with new platform package will not work. Also important, have you eventually modified some platform package files?

Best regards 

Paul Banach

by
Hi Paul,

This all looks ok, I do not get any version warnings.

Tracing the class through I get:

/* Global constant containing the main application class. */
const XClass EwApplicationClass = EW_CLASS( ApplicationApplication ); as expected.

I have cleaned and rebuilt in EmWi 9.20 but this didn't help.
0 votes
by
Hello Phil,

which target platform are you using?

Are you using the original ewmain.c or did you make and changes?

Do you get any messages on serial console?

Please note, that EwBspConfigSystem() has to be called before EwInit().

Kind Regards,
Martin
by
Hi Martin,

The hardware is our own, based heavily on the STM32F746 Disco. We have had this hardware running for a while on 9.10 without issue.

I have just started from scratch, with clean a clean copy of ewmain.c, the only changes are adding the includes for our flash / peripherals etc.

I still get the same fault.
by
Is it possible to run the project on STM32F746 Disco?

Would it be possible to provide us your project?
by
Hi Martin,

 

No, I don't have a disco board available at the moment. I'm also not sure our UI will fit without stripping it back.

If you can email me your gitlab username I can give you access to the repo.
by
Hi Phil,
I found, that the macro EW_USE_QSPI_FLASH has changed to EW_USE_EXTERNAL_FLASH in V9.20.
Therefore I assume, that BSP_QSPI code is not called in EwBspConfigSystem() and the external Flash is accessed without initialization afterwards.

Best Regards,
Martin

Ask Embedded Wizard

Welcome to the question and answer site for Embedded Wizard users and UI developers.

Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!

Embedded Wizard Website | Privacy Policy | Imprint

...