Overview
Thedevcpc validate command performs pre-build validation of your project, checking configuration, file paths, source files, and required tools.
Syntax
Validation Steps
The command performs the following checks:- Configuration validation - Verifies required variables
- Path validation - Checks all configured paths exist
- Source file validation - Verifies source files are present
- Tool validation - Checks required tools are installed
Output Example (Success)
Output Example (Warnings)
Output Example (Errors)
Validation Categories
Configuration Validation
PROJECT_NAME
PROJECT_NAME
- Required: Yes
- Type: String
- Error if: Not defined or empty
BUILD_LEVEL
BUILD_LEVEL
- Required: Only for 8BP projects
- Type: Integer (0-4)
- Error if: Not 0-4 for 8BP projects
- Optional: For non-8BP projects
Path Validation
ASM_PATH
ASM_PATH
- Checks: File exists (8BP) or directory exists (pure ASM)
- Verifies:
make_all_mygame.asmif 8BP project - Error if: Path doesn’t exist
BASIC_PATH
BASIC_PATH
- Checks: Directory exists
- Counts: Number of
.basfiles - Error if: Directory doesn’t exist
RAW_PATH
RAW_PATH
- Checks: Directory exists
- Counts: Number of files
- Error if: Directory doesn’t exist
C_PATH
C_PATH
- Checks: Directory exists
- Verifies:
C_SOURCEfile exists - Error if: Directory doesn’t exist
- Warning if:
C_SOURCEnot found
Tool Validation
Python 3
Python 3
- Required: Yes (for all projects)
- Command:
python3 --version - Error if: Not installed
SDCC
SDCC
- Required: Only if
C_PATHconfigured - Command:
sdcc --version - Warning if: Not installed but C code configured
Validation Rules
8BP Project Detection
A project is detected as 8BP if:ASM_PATHpoints to a file namedmake_all_mygame.asm, ORASM_PATHis a directory containingmake_all_mygame.asm
BUILD_LEVEL is required.
Source Code Requirement
At least one of these must be configured:ASM_PATH(assembler code)BASIC_PATH(BASIC files)C_PATH+C_SOURCE(C code)
Exit Codes
| Exit Code | Meaning | Condition |
|---|---|---|
| 0 | Success | No errors (warnings allowed) |
| 1 | Failure | One or more errors found |
Use Cases
Pre-Build Validation
Validate before building:CI/CD Integration
Use in continuous integration:New Project Setup
Validate after creating project:Troubleshooting
Find configuration issues:Pre-Release Check
Final validation before release:Common Validation Errors
Missing PROJECT_NAME
Invalid BUILD_LEVEL
Path Not Found
Python Not Installed
Validation vs Info
| Command | Purpose | Checks |
|---|---|---|
validate | Verify correctness | Files exist, tools installed, config valid |
info | Show configuration | Display settings only |
Related Commands
devcpc info- Display configurationdevcpc build- Build after validationdevcpc new- Create valid project