parallaxinc / SimpleIDE

SimpleIDE for Propeller
26 stars 13 forks source link

Parse message codes from new PropLoader #260

Open PropGit opened 8 years ago

PropGit commented 8 years ago

The new PropLoader outputs fewer and more clear messages with an optional message code.

Action

Include the new PropLoader in builds of SimpleIDE and issue the -c option with proploader.exe on the command so it outputs message codes. Capture these codes (for potential processing) but strip them from the output so users still see codeless message in the Build Status window. Messages with codes will always start with a 3-digit number followed immediately by a hyphen '-' making it easy to find codes, digest them, and strip them from messages. Format is ###-.

NOTE: There may be some messages without leading codes, so it's important not to blindly strip the first four characters from the messages without first verifying that they are in the format ###-.

This new SimpleIDE feature is important to support Issue #261.

Background

There are three categories of messages and thus message codes:

Code numbers will never be reused for a condition that means something different than that which was first assigned to a message.

Top messages and their codes.

STATE/PROGRESS/EVENT "001-Opening file %s", file "002-Downloading to Propeller\n" "003-Verifying RAM" "004-Programming EEPROM" "005-Download successful!" "006-[ Entering terminal mode. Type ESC or Control-C to exit. ]" "007-Writing %s to the SD card", file "008-%ld bytes remaining" "009-%ld bytes sent" "010-Setting module name to %s"

ERRORS "100-Option -n can only be used to name wifi modules\n" "101-Invalid address: %s\n", ip_address "102-Download failed: %d\n", sts "103-Can't open file '%s'\n", file "104-Propeller not found on port %s\n", port_or_ip_address "105-Failed to enter terminal mode\n" "106-Unrecognized wi-fi module firmware\n" " Version is %s but expected %s.x...\n", wifiConnection->version(), WIFI_REQUIRED_MAJOR_VERSION " Recommended action: update firmware and/or PropLoader to latest version(s).” "107-Failed to write SD card file: '%s'\n", file "108-Invalid module name\n" "109-Failed to set module name\n"