altos: Report amount of program space available in the version command
authorKeith Packard <keithp@keithp.com>
Tue, 13 May 2014 05:51:16 +0000 (22:51 -0700)
committerKeith Packard <keithp@keithp.com>
Tue, 13 May 2014 05:51:16 +0000 (22:51 -0700)
Signed-off-by: Keith Packard <keithp@keithp.com>
src/kernel/ao_cmd.c

index 4ebaa6079368ec80164a8176d8d010914552cc9d..cd662314177c80a61520040c5932481dafc67bad 100644 (file)
@@ -279,6 +279,9 @@ version(void)
 #endif
 #if HAS_LOG
               "log-format       %u\n"
+#endif
+#if defined(AO_BOOT_APPLICATION_BASE) && defined(AO_BOOT_APPLICATION_BOUND)
+              "program-space    %u\n"
 #endif
               , ao_manufacturer
               , ao_product
@@ -288,6 +291,9 @@ version(void)
 #endif
 #if HAS_LOG
               , ao_log_format
+#endif
+#if defined(AO_BOOT_APPLICATION_BASE) && defined(AO_BOOT_APPLICATION_BOUND)
+              , (uint32_t) AO_BOOT_APPLICATION_BOUND - (uint32_t) AO_BOOT_APPLICATION_BASE
 #endif
                );
        printf("software-version %s\n", ao_version);