I'm using Simplicity Studio with Keil C51 v9.53...
I tried enabling c99 compatibility by adding "--c99" to the "Additional Flags" setting within the compiler settings in project properties. Long story short: it went from complaining about my unknown array size (in a structure) to this:
C51 FATAL-ERROR - ACTION: PARSING INVOKE-/#PRAGMA-LINE LINE: C:\SiliconLabs\SimplicityStudio\v4\developer\toolchains\keil_8051\9.53\BIN\C51.exe ..\..\modbus_rtu_slave\mb_server.c OMF2 SMALL DEBUG OBJECTEXTEND ROM(LARGE) WARNINGLEVEL(2) FLOATFUZZY(3) OPTIMIZE(8,SPEED) DEFINE(DEBUG=1) INTVECTOR(0X0000) INTPROMOTE INCDIR(C:/SiliconLabs/SimplicityStudio/v4/developer/sdks/8051/v4.0.3//Device/shared/si8051base;C:\Users\clark\Projects\Controller-4\SiLabs Code\Common;C:\Users\clark\Projects\Controller-4\SiLabs Code\modbus_rtu_slave;C:\Users\clark\Projects\Controller-4\SiLabs Code\Stepper-A4988;C:/SiliconLabs/SimplicityStudio/v4/developer/sdks/8051/v4.0.3//Device/C8051F540/inc) PRINT(.\src\modbus_rtu_slave\mb_server.lst) COND PAGEWIDTH(120) PAGELENGTH(65) ERROR: NON-NULL ARGUMENT EXPECTED C51 TERMINATED.
I believe this is the command line being issued by the builder:
C51 "..\\..\\modbus_rtu_slave\\mb_server.c" OMF2 SMALL DEBUG OBJECTEXTEND ROM(LARGE) WARNINGLEVEL (2) FLOATFUZZY(3) OPTIMIZE(8,SPEED) DEFINE (DEBUG=1) INTVECTOR(0x0000) INTPROMOTE "INCDIR(C:/SiliconLabs/SimplicityStudio/v4/developer/sdks/8051/v4.0.3//Device/shared/si8051base;C:\\Users\\clark\\Projects\\Controller-4\\SiLabs" "Code\\Common;C:\\Users\\clark\\Projects\\Controller-4\\SiLabs" "Code\\modbus_rtu_slave;C:\\Users\\clark\\Projects\\Controller-4\\SiLabs" "Code\\Stepper-A4988;C:/SiliconLabs/SimplicityStudio/v4/developer/sdks/8051/v4.0.3//Device/C8051F540/inc)" "PRINT(.\\src\\modbus_rtu_slave\\mb_server.lst)" COND PAGEWIDTH (120) PAGELENGTH (65) --c99 "OBJECT(.\\src\\modbus_rtu_slave\\mb_server.OBJ)"
What is wrong?
I tried enabling c99 compatibility by adding "--c99" to the "Additional Flags" setting
That would only have a chance of working if C51 had a --c99 option. It does not.
So you'll have to go back to solving the actual problem instead of just trying any random thing you've read somewhere.
So think about it: what does "NON-NULL ARGUMENT EXPECTED" actually tell you?
It sounds like you have omitted to supply an argument (ie, you have supplied a null argument) to one of your command-line options which requires an argument.
Sure, the message could have been more helpful and said which option it relates to - but you'll just have to go through the list to find it ...
If we all knew everything, as you obviously do, there would be no need for these forums. Where would you then flaunt your intellectual superiority? Or maybe, if you're not going to be helpful, just keep your cake-hole shut.